Interface IKeyMappingExtension
public interface IKeyMappingExtension
Extension interface for
KeyMapping
.-
Method Summary
Modifier and TypeMethodDescriptiondefault net.minecraft.network.chat.Component
Returns the display name of this key mapping.com.mojang.blaze3d.platform.InputConstants.Key
getKey()
default boolean
hasKeyModifierConflict
(net.minecraft.client.KeyMapping other) Returns true when one of the bindings' key codes conflicts with the other's modifier.default boolean
isActiveAndMatches
(com.mojang.blaze3d.platform.InputConstants.Key keyCode) Returns true if the key conflict context and modifier are active and the keyCode matches this binding, false otherwise.default boolean
private net.minecraft.client.KeyMapping
self()
void
setKeyConflictContext
(IKeyConflictContext keyConflictContext) void
setKeyModifierAndCode
(KeyModifier keyModifier, com.mojang.blaze3d.platform.InputConstants.Key keyCode) default void
-
Method Details
-
self
private net.minecraft.client.KeyMapping self() -
getKey
com.mojang.blaze3d.platform.InputConstants.Key getKey() -
isActiveAndMatches
default boolean isActiveAndMatches(com.mojang.blaze3d.platform.InputConstants.Key keyCode) Returns true if the key conflict context and modifier are active and the keyCode matches this binding, false otherwise.- Returns:
- true if the key conflict context and modifier are active and the keyCode matches this binding, false otherwise
-
setToDefault
default void setToDefault() -
setKeyConflictContext
-
getKeyConflictContext
IKeyConflictContext getKeyConflictContext() -
getDefaultKeyModifier
KeyModifier getDefaultKeyModifier() -
getKeyModifier
KeyModifier getKeyModifier() -
setKeyModifierAndCode
void setKeyModifierAndCode(KeyModifier keyModifier, com.mojang.blaze3d.platform.InputConstants.Key keyCode) -
isConflictContextAndModifierActive
default boolean isConflictContextAndModifierActive() -
hasKeyModifierConflict
default boolean hasKeyModifierConflict(net.minecraft.client.KeyMapping other) Returns true when one of the bindings' key codes conflicts with the other's modifier. -
getDisplayName
default net.minecraft.network.chat.Component getDisplayName()Returns the display name of this key mapping. Defaults to a translatable component of thename
.- Returns:
- the display name of this key mapping
-