Record Class ClientPlayerPositionPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.client.play.ClientPlayerPositionPacket
- All Implemented Interfaces:
ClientPacket
public record ClientPlayerPositionPacket(@NotNull Point position, byte flags)
extends Record
implements ClientPacket
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final NetworkBuffer.Type
<ClientPlayerPositionPacket> -
Constructor Summary
ConstructorDescriptionClientPlayerPositionPacket
(@NotNull Point position, boolean onGround, boolean horizontalCollision) ClientPlayerPositionPacket
(@NotNull Point position, byte flags) Creates an instance of aClientPlayerPositionPacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.byte
flags()
Returns the value of theflags
record component.final int
hashCode()
Returns a hash code value for this object.boolean
boolean
onGround()
@NotNull Point
position()
Returns the value of theposition
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
FLAG_ON_GROUND
public static final int FLAG_ON_GROUND- See Also:
-
FLAG_HORIZONTAL_COLLISION
public static final int FLAG_HORIZONTAL_COLLISION- See Also:
-
SERIALIZER
-
-
Constructor Details
-
ClientPlayerPositionPacket
public ClientPlayerPositionPacket(@NotNull @NotNull Point position, boolean onGround, boolean horizontalCollision) -
ClientPlayerPositionPacket
Creates an instance of aClientPlayerPositionPacket
record class.- Parameters:
position
- the value for theposition
record componentflags
- the value for theflags
record component
-
-
Method Details
-
onGround
public boolean onGround() -
horizontalCollision
public boolean horizontalCollision() -
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 '=='. -
position
Returns the value of theposition
record component.- Returns:
- the value of the
position
record component
-
flags
public byte flags()Returns the value of theflags
record component.- Returns:
- the value of the
flags
record component
-