Record Class PlatformPlayerAdapter.Coordinates
java.lang.Object
java.lang.Record
net.flectone.pulse.platform.adapter.PlatformPlayerAdapter.Coordinates
- Record Components:
x- the X coordinatey- the Y coordinatez- the Z coordinate
- Enclosing interface:
PlatformPlayerAdapter
public static record PlatformPlayerAdapter.Coordinates(double x, double y, double z, float yaw, float pitch)
extends Record
Player coordinates in the world.
- Since:
- 0.8.1
-
Constructor Summary
ConstructorsConstructorDescriptionCoordinates(double x, double y, double z, float yaw, float pitch) Creates an instance of aCoordinatesrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleThe straight-line distance to another point, ignoring the facing angles.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatpitch()Returns the value of thepitchrecord component.final StringtoString()Returns a string representation of this record class.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.floatyaw()Returns the value of theyawrecord component.doublez()Returns the value of thezrecord component.
-
Constructor Details
-
Coordinates
public Coordinates(double x, double y, double z, float yaw, float pitch) Creates an instance of aCoordinatesrecord class.
-
-
Method Details
-
distance
The straight-line distance to another point, ignoring the facing angles.- Parameters:
other- the other point- Returns:
- the distance
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
x
-
y
-
z
-
yaw
public float yaw()Returns the value of theyawrecord component.- Returns:
- the value of the
yawrecord component
-
pitch
public float pitch()Returns the value of thepitchrecord component.- Returns:
- the value of the
pitchrecord component
-