Record Class PlayerRotationPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.PlayerRotationPacket
- All Implemented Interfaces:
SendablePacket, ServerPacket, ServerPacket.Play
public record PlayerRotationPacket(float yaw, boolean relativeYaw, float pitch, boolean relativePitch)
extends Record
implements ServerPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPlayerRotationPacket(float yaw, boolean relativeYaw, float pitch, boolean relativePitch) Creates an instance of aPlayerRotationPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.booleanReturns the value of therelativePitchrecord component.booleanReturns the value of therelativeYawrecord component.final StringtoString()Returns a string representation of this record class.floatyaw()Returns the value of theyawrecord component.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
PlayerRotationPacket
public PlayerRotationPacket(float yaw, boolean relativeYaw, float pitch, boolean relativePitch) Creates an instance of aPlayerRotationPacketrecord class.- Parameters:
yaw- the value for theyawrecord componentrelativeYaw- the value for therelativeYawrecord componentpitch- the value for thepitchrecord componentrelativePitch- the value for therelativePitchrecord component
-
-
Method Details
-
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. -
yaw
public float yaw()Returns the value of theyawrecord component.- Returns:
- the value of the
yawrecord component
-
relativeYaw
public boolean relativeYaw()Returns the value of therelativeYawrecord component.- Returns:
- the value of the
relativeYawrecord component
-
pitch
public float pitch()Returns the value of thepitchrecord component.- Returns:
- the value of the
pitchrecord component
-
relativePitch
public boolean relativePitch()Returns the value of therelativePitchrecord component.- Returns:
- the value of the
relativePitchrecord component
-