Package net.minecraft.server.chase
Record Class ChaseServer.PlayerPosition
java.lang.Object
java.lang.Record
net.minecraft.server.chase.ChaseServer.PlayerPosition
- Enclosing class:
ChaseServer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thedimensionNamerecord component.private final doubleThe field for thexrecord component.private final floatThe field for thexRotrecord component.private final doubleThe field for theyrecord component.private final floatThe field for theyRotrecord component.private final doubleThe field for thezrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPlayerPosition(String dimensionName, double x, double y, double z, float yRot, float xRot) Creates an instance of aPlayerPositionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedimensionNamerecord component.final booleanIndicates whether some other object is "equal to" this one.(package private) Stringformat()final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.doublex()Returns the value of thexrecord component.floatxRot()Returns the value of thexRotrecord component.doubley()Returns the value of theyrecord component.floatyRot()Returns the value of theyRotrecord component.doublez()Returns the value of thezrecord component.
-
Field Details
-
dimensionName
The field for thedimensionNamerecord component. -
x
private final double xThe field for thexrecord component. -
y
private final double yThe field for theyrecord component. -
z
private final double zThe field for thezrecord component. -
yRot
private final float yRotThe field for theyRotrecord component. -
xRot
private final float xRotThe field for thexRotrecord component.
-
-
Constructor Details
-
PlayerPosition
PlayerPosition(String dimensionName, double x, double y, double z, float yRot, float xRot) Creates an instance of aPlayerPositionrecord class.- Parameters:
dimensionName- the value for thedimensionNamerecord componentx- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componentyRot- the value for theyRotrecord componentxRot- the value for thexRotrecord component
-
-
Method Details
-
format
String format() -
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 '=='. -
dimensionName
Returns the value of thedimensionNamerecord component.- Returns:
- the value of the
dimensionNamerecord component
-
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
-
z
public double z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
yRot
public float yRot()Returns the value of theyRotrecord component.- Returns:
- the value of the
yRotrecord component
-
xRot
public float xRot()Returns the value of thexRotrecord component.- Returns:
- the value of the
xRotrecord component
-