Record Class EntityTeleportPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.EntityTeleportPacket
- All Implemented Interfaces:
SendablePacket,ServerPacket,ServerPacket.Play
public record EntityTeleportPacket(int entityId, Pos position, Point delta, int flags, boolean onGround)
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
ConstructorsConstructorDescriptionEntityTeleportPacket(int entityId, Pos position, Point delta, int flags, boolean onGround) Creates an instance of aEntityTeleportPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondelta()Returns the value of thedeltarecord component.intentityId()Returns the value of theentityIdrecord 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.booleanonGround()Returns the value of theonGroundrecord component.position()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
EntityTeleportPacket
public EntityTeleportPacket(int entityId, Pos position, Point delta, @MagicConstant(flagsFromClass=RelativeFlags.class) int flags, boolean onGround) Creates an instance of aEntityTeleportPacketrecord class.- Parameters:
entityId- the value for theentityIdrecord componentposition- the value for thepositionrecord componentdelta- the value for thedeltarecord componentflags- the value for theflagsrecord componentonGround- the value for theonGroundrecord 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 '=='. -
entityId
public int entityId()Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord 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
-
flags
Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-
onGround
public boolean onGround()Returns the value of theonGroundrecord component.- Returns:
- the value of the
onGroundrecord component
-