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 pName, int pKey, KeyMapping.Category pCategory, BooleanSupplier pNeedsToggle, boolean pShouldRestore) ToggleKeyMapping(String pName, InputConstants.Type pType, int pKey, KeyMapping.Category pCategory, BooleanSupplier pNeedsToggle, boolean pShouldRestore) -
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 pName, int pKey, KeyMapping.Category pCategory, BooleanSupplier pNeedsToggle, boolean pShouldRestore) -
ToggleKeyMapping
public ToggleKeyMapping(String pName, InputConstants.Type pType, int pKey, KeyMapping.Category pCategory, BooleanSupplier pNeedsToggle, boolean pShouldRestore)
-
-
Method Details
-
shouldSetOnIngameFocus
protected boolean shouldSetOnIngameFocus()- Overrides:
shouldSetOnIngameFocusin classKeyMapping
-
setDown
public void setDown(boolean pValue) - 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()
-