Package net.minecraft.client
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 net.minecraft.client.KeyMapping
KeyMapping.Category -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BooleanSupplierprivate booleanprivate final booleanFields inherited from class net.minecraft.client.KeyMapping
isDown, key -
Constructor Summary
ConstructorsConstructorDescriptionToggleKeyMapping(String name, int key, KeyMapping.Category category, BooleanSupplier needsToggle, boolean shouldRestore) ToggleKeyMapping(String name, InputConstants.Type type, int key, KeyMapping.Category category, BooleanSupplier needsToggle, boolean shouldRestore) -
Method Summary
Methods inherited from class net.minecraft.client.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.client.extensions.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 key, KeyMapping.Category category, BooleanSupplier needsToggle, boolean shouldRestore) -
ToggleKeyMapping
public ToggleKeyMapping(String name, InputConstants.Type type, int key, KeyMapping.Category category, BooleanSupplier needsToggle, boolean shouldRestore)
-
-
Method Details
-
shouldSetOnIngameFocus
protected boolean shouldSetOnIngameFocus()- Overrides:
shouldSetOnIngameFocusin classKeyMapping
-
setDown
public void setDown(boolean value) - 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()
-