Package net.minecraft.client.input
Record Class MouseButtonInfo
java.lang.Object
java.lang.Record
net.minecraft.client.input.MouseButtonInfo
- All Implemented Interfaces:
InputWithModifiers
public record MouseButtonInfo(int button, int modifiers)
extends Record
implements InputWithModifiers
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thebuttonrecord component.private final intThe field for themodifiersrecord component.Fields inherited from interface net.minecraft.client.input.InputWithModifiers
NOT_DIGIT -
Constructor Summary
ConstructorsConstructorDescriptionMouseButtonInfo(int button, int modifiers) Creates an instance of aMouseButtonInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbutton()Returns the value of thebuttonrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intinput()intReturns the value of themodifiersrecord 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.InputWithModifiers
getDigit, hasAltDown, hasControlDown, hasShiftDown, isConfirmation, isCopy, isCut, isCycleFocus, isDown, isEscape, isLeft, isPaste, isRight, isSelectAll, isSelection, isUp
-
Field Details
-
button
private final int buttonThe field for thebuttonrecord component. -
modifiers
private final int modifiersThe field for themodifiersrecord component.
-
-
Constructor Details
-
MouseButtonInfo
public MouseButtonInfo(int button, int modifiers) Creates an instance of aMouseButtonInforecord class.- Parameters:
button- the value for thebuttonrecord componentmodifiers- the value for themodifiersrecord component
-
-
Method Details
-
input
public int input()- Specified by:
inputin interfaceInputWithModifiers
-
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 '=='. -
button
public int button()Returns the value of thebuttonrecord component.- Returns:
- the value of the
buttonrecord component
-
modifiers
public int modifiers()Returns the value of themodifiersrecord component.- Specified by:
modifiersin interfaceInputWithModifiers- Returns:
- the value of the
modifiersrecord component
-