Record Class MouseButtonEvent
java.lang.Object
java.lang.Record
net.minecraft.client.input.MouseButtonEvent
- All Implemented Interfaces:
InputWithModifiers
public record MouseButtonEvent(double x, double y, MouseButtonInfo buttonInfo)
extends Record
implements InputWithModifiers
-
Nested Class Summary
Nested classes/interfaces inherited from interface InputWithModifiers
InputWithModifiers.Modifiers -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MouseButtonInfoThe field for thebuttonInforecord component.private final doubleThe field for thexrecord component.private final doubleThe field for theyrecord component.Fields inherited from interface InputWithModifiers
NOT_DIGIT -
Constructor Summary
ConstructorsConstructorDescriptionMouseButtonEvent(double x, double y, MouseButtonInfo buttonInfo) Creates an instance of aMouseButtonEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbutton()Returns the value of thebuttonInforecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intinput()intfinal StringtoString()Returns a string representation of this record class.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.Methods inherited from interface InputWithModifiers
getDigit, hasAltDown, hasControlDown, hasControlDownWithQuirk, hasShiftDown, isConfirmation, isCopy, isCut, isCycleFocus, isDown, isEscape, isLeft, isPaste, isRight, isSelectAll, isSelection, isUp
-
Field Details
-
x
private final double xThe field for thexrecord component. -
y
private final double yThe field for theyrecord component. -
buttonInfo
The field for thebuttonInforecord component.
-
-
Constructor Details
-
MouseButtonEvent
Creates an instance of aMouseButtonEventrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentbuttonInfo- the value for thebuttonInforecord component
-
-
Method Details
-
input
public int input()- Specified by:
inputin interfaceInputWithModifiers
-
button
public int button() -
modifiers
public int modifiers()- Specified by:
modifiersin interfaceInputWithModifiers
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
buttonInfo
Returns the value of thebuttonInforecord component.- Returns:
- the value of the
buttonInforecord component
-