Module net.minestom.server
Record Class PlayerPositionAndLookPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.PlayerPositionAndLookPacket
- All Implemented Interfaces:
SendablePacket
,ServerPacket
,ServerPacket.Play
public record PlayerPositionAndLookPacket(int teleportId, Point position, Point delta, float yaw, float pitch, int flags)
extends Record
implements ServerPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.network.packet.server.ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPlayerPositionAndLookPacket
(int teleportId, Point position, Point delta, float yaw, float pitch, int flags) Creates an instance of aPlayerPositionAndLookPacket
record class. -
Method Summary
Modifier and TypeMethodDescriptiondelta()
Returns the value of thedelta
record component.final boolean
Indicates whether some other object is "equal to" this one.int
flags()
Returns the value of theflags
record component.final int
hashCode()
Returns a hash code value for this object.float
pitch()
Returns the value of thepitch
record component.position()
Returns the value of theposition
record component.int
Returns the value of theteleportId
record component.final String
toString()
Returns a string representation of this record class.float
yaw()
Returns the value of theyaw
record component.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
PlayerPositionAndLookPacket
public PlayerPositionAndLookPacket(int teleportId, Point position, Point delta, float yaw, float pitch, @MagicConstant(flagsFromClass=RelativeFlags.class) int flags) Creates an instance of aPlayerPositionAndLookPacket
record class.- Parameters:
teleportId
- the value for theteleportId
record componentposition
- the value for theposition
record componentdelta
- the value for thedelta
record componentyaw
- the value for theyaw
record componentpitch
- the value for thepitch
record componentflags
- the value for theflags
record component
-
-
Method Details
-
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 '=='. -
teleportId
public int teleportId()Returns the value of theteleportId
record component.- Returns:
- the value of the
teleportId
record component
-
position
Returns the value of theposition
record component.- Returns:
- the value of the
position
record component
-
delta
Returns the value of thedelta
record component.- Returns:
- the value of the
delta
record component
-
yaw
public float yaw()Returns the value of theyaw
record component.- Returns:
- the value of the
yaw
record component
-
pitch
public float pitch()Returns the value of thepitch
record component.- Returns:
- the value of the
pitch
record component
-
flags
Returns the value of theflags
record component.- Returns:
- the value of the
flags
record component
-