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
Modifier and TypeFieldDescriptionprivate final String
The field for thedimensionName
record component.private final double
The field for thex
record component.private final float
The field for thexRot
record component.private final double
The field for they
record component.private final float
The field for theyRot
record component.private final double
The field for thez
record component. -
Constructor Summary
ConstructorDescriptionPlayerPosition
(String dimensionName, double x, double y, double z, float yRot, float xRot) Creates an instance of aPlayerPosition
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedimensionName
record component.final boolean
Indicates whether some other object is "equal to" this one.(package private) String
format()
final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.double
x()
Returns the value of thex
record component.float
xRot()
Returns the value of thexRot
record component.double
y()
Returns the value of they
record component.float
yRot()
Returns the value of theyRot
record component.double
z()
Returns the value of thez
record component.
-
Field Details
-
dimensionName
The field for thedimensionName
record component. -
x
private final double xThe field for thex
record component. -
y
private final double yThe field for they
record component. -
z
private final double zThe field for thez
record component. -
yRot
private final float yRotThe field for theyRot
record component. -
xRot
private final float xRotThe field for thexRot
record component.
-
-
Constructor Details
-
PlayerPosition
PlayerPosition(String dimensionName, double x, double y, double z, float yRot, float xRot) Creates an instance of aPlayerPosition
record class.- Parameters:
dimensionName
- the value for thedimensionName
record componentx
- the value for thex
record componenty
- the value for they
record componentz
- the value for thez
record componentyRot
- the value for theyRot
record componentxRot
- the value for thexRot
record 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 thedimensionName
record component.- Returns:
- the value of the
dimensionName
record component
-
x
public double x()Returns the value of thex
record component.- Returns:
- the value of the
x
record component
-
y
public double y()Returns the value of they
record component.- Returns:
- the value of the
y
record component
-
z
public double z()Returns the value of thez
record component.- Returns:
- the value of the
z
record component
-
yRot
public float yRot()Returns the value of theyRot
record component.- Returns:
- the value of the
yRot
record component
-
xRot
public float xRot()Returns the value of thexRot
record component.- Returns:
- the value of the
xRot
record component
-