Class ToggleKeyMapping
java.lang.Object
net.minecraft.client.KeyMapping
net.minecraft.client.ToggleKeyMapping
- All Implemented Interfaces:
Comparable<KeyMapping>, IKeyMappingExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class KeyMapping
KeyMapping.Category -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BooleanSupplierprivate booleanprivate final booleanFields inherited from class KeyMapping
isDown, key -
Constructor Summary
ConstructorsConstructorDescriptionToggleKeyMapping(String name, int value, KeyMapping.Category category, BooleanSupplier needsToggle, boolean shouldRestore) ToggleKeyMapping(String name, InputConstants.Type type, int value, KeyMapping.Category category, BooleanSupplier needsToggle, boolean shouldRestore) -
Method Summary
Methods inherited from class KeyMapping
click, compareTo, consumeClick, createNameSupplier, get, getCategory, getDefaultKey, getDefaultKeyModifier, getKey, getKeyConflictContext, getKeyModifier, getName, getTranslatedKeyMessage, isDefault, isUnbound, matches, matchesMouse, releaseAll, resetMapping, resetToggleKeys, restoreToggleStatesOnScreenClosed, same, saveString, set, setAll, setKey, setKeyConflictContext, setKeyModifierAndCodeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IKeyMappingExtension
getDisplayName, hasKeyModifierConflict, isActiveAndMatches, isConflictContextAndModifierActive, setToDefault
-
Field Details
-
needsToggle
-
releasedByScreenWhenDown
private boolean releasedByScreenWhenDown -
shouldRestore
private final boolean shouldRestore
-
-
Constructor Details
-
ToggleKeyMapping
public ToggleKeyMapping(String name, int value, KeyMapping.Category category, BooleanSupplier needsToggle, boolean shouldRestore) -
ToggleKeyMapping
public ToggleKeyMapping(String name, InputConstants.Type type, int value, KeyMapping.Category category, BooleanSupplier needsToggle, boolean shouldRestore)
-
-
Method Details
-
shouldSetOnIngameFocus
protected boolean shouldSetOnIngameFocus()- Overrides:
shouldSetOnIngameFocusin classKeyMapping
-
setDown
public void setDown(boolean down) - Overrides:
setDownin classKeyMapping
-
isDown
public boolean isDown()- Overrides:
isDownin classKeyMapping
-
release
protected void release()- Overrides:
releasein classKeyMapping
-
shouldRestoreStateOnScreenClosed
public boolean shouldRestoreStateOnScreenClosed() -
reset
protected void reset()
-