Package net.minecraft.client.input
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 net.minecraft.client.input.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 net.minecraft.client.input.InputWithModifiers
NOT_DIGIT -
Constructor Summary
ConstructorsConstructorDescriptionMouseButtonEvent(double x, double y, MouseButtonInfo buttonInfo) Creates an instance of aMouseButtonEventrecord class. -
Method Summary
Modifier and TypeMethodDescription@net.minecraft.client.input.MouseButtonInfo.MouseButton intbutton()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()@net.minecraft.client.input.InputWithModifiers.Modifiers 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.client.input.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 @net.minecraft.client.input.MouseButtonInfo.MouseButton int button() -
modifiers
public @net.minecraft.client.input.InputWithModifiers.Modifiers int modifiers()- Specified by:
modifiersin 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
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
-