Package net.minecraft.client.input
Record Class KeyInput
java.lang.Object
java.lang.Record
net.minecraft.client.input.KeyInput
- Record Components:
key-scancode-modifiers-
- All Implemented Interfaces:
AbstractInput
@Environment(CLIENT)
public record KeyInput(@net.minecraft.client.util.InputUtil.Keycode int key, int scancode, @net.minecraft.client.input.AbstractInput.Modifier int modifiers)
extends Record
implements AbstractInput
- Mappings:
Namespace Name named net/minecraft/client/input/KeyInputintermediary net/minecraft/class_11908official gwlnamed keyintermediary comp_4795official bnamed scancodeintermediary comp_4796official cnamed modifiersintermediary comp_4797official d
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.client.input.AbstractInput
AbstractInput.Modifier -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @net.minecraft.client.util.InputUtil.Keycode intThe field for thekeyrecord component.private final @net.minecraft.client.input.AbstractInput.Modifier intThe field for themodifiersrecord component.private final intThe field for thescancoderecord component.Fields inherited from interface net.minecraft.client.input.AbstractInput
NOT_A_NUMBER -
Constructor Summary
ConstructorsConstructorDescriptionKeyInput(int key, int scancode, int modifiers) Creates an instance of aKeyInputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intfinal inthashCode()Returns a hash code value for this object.intkey()Returns the value of thekeyrecord component.intReturns the value of themodifiersrecord component.intscancode()Returns the value of thescancoderecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.client.input.AbstractInput
asNumber, hasAlt, hasCtrl, hasCtrlOrCmd, hasShift, isCopy, isCut, isDown, isEnter, isEnterOrSpace, isEscape, isLeft, isPaste, isRight, isSelectAll, isTab, isUp
-
Field Details
-
key
private final @net.minecraft.client.util.InputUtil.Keycode int keyThe field for thekeyrecord component. -
scancode
private final int scancodeThe field for thescancoderecord component. -
modifiers
private final @net.minecraft.client.input.AbstractInput.Modifier int modifiersThe field for themodifiersrecord component.
-
-
Constructor Details
-
Method Details
-
getKeycode
public int getKeycode()- Specified by:
getKeycodein interfaceAbstractInput- Mappings:
Namespace Name Mixin selector named getKeycodeLnet/minecraft/client/input/AbstractInput;getKeycode()Iintermediary method_74228Lnet/minecraft/class_11907;method_74228()Iofficial aLgwk;a()I
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
key
public int key()Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
scancode
public int scancode()Returns the value of thescancoderecord component.- Returns:
- the value of the
scancoderecord component
-
modifiers
public int modifiers()Returns the value of themodifiersrecord component.- Specified by:
modifiersin interfaceAbstractInput- Returns:
- the value of the
modifiersrecord component
-