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 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 aPlayerPositionAndLookPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondelta()Returns the value of thedeltarecord component.final booleanIndicates whether some other object is "equal to" this one.intflags()Returns the value of theflagsrecord component.final inthashCode()Returns a hash code value for this object.floatpitch()Returns the value of thepitchrecord component.position()Returns the value of thepositionrecord component.intReturns the value of theteleportIdrecord component.final StringtoString()Returns a string representation of this record class.floatyaw()Returns the value of theyawrecord 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 aPlayerPositionAndLookPacketrecord class.- Parameters:
teleportId- the value for theteleportIdrecord componentposition- the value for thepositionrecord componentdelta- the value for thedeltarecord componentyaw- the value for theyawrecord componentpitch- the value for thepitchrecord componentflags- the value for theflagsrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
teleportId
public int teleportId()Returns the value of theteleportIdrecord component.- Returns:
- the value of the
teleportIdrecord component
-
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
delta
Returns the value of thedeltarecord component.- Returns:
- the value of the
deltarecord component
-
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
-
flags
Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-