Record Class ClientboundPlayerPositionPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundPlayerPositionPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundPlayerPositionPacket(int id, PositionMoveRotation change, Set<Relative> relatives)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PositionMoveRotation
The field for thechange
record component.private final int
The field for theid
record component.The field for therelatives
record component.static final StreamCodec
<FriendlyByteBuf, ClientboundPlayerPositionPacket> -
Constructor Summary
ConstructorsConstructorDescriptionClientboundPlayerPositionPacket
(int id, PositionMoveRotation change, Set<Relative> relatives) Creates an instance of aClientboundPlayerPositionPacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionchange()
Returns the value of thechange
record component.final boolean
Indicates whether some other object is "equal to" this one.void
handle
(ClientGamePacketListener p_132817_) final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of theid
record component.of
(int p_371253_, PositionMoveRotation p_371666_, Set<Relative> p_371475_) Returns the value of therelatives
record component.final String
toString()
Returns a string representation of this record class.type()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
id
private final int idThe field for theid
record component. -
change
The field for thechange
record component. -
relatives
The field for therelatives
record component. -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundPlayerPositionPacket
public ClientboundPlayerPositionPacket(int id, PositionMoveRotation change, Set<Relative> relatives) Creates an instance of aClientboundPlayerPositionPacket
record class.- Parameters:
id
- the value for theid
record componentchange
- the value for thechange
record componentrelatives
- the value for therelatives
record component
-
-
Method Details
-
of
public static ClientboundPlayerPositionPacket of(int p_371253_, PositionMoveRotation p_371666_, Set<Relative> p_371475_) -
type
- Specified by:
type
in interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handle
in interfacePacket<ClientGamePacketListener>
-
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 '=='. -
id
public int id()Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
change
Returns the value of thechange
record component.- Returns:
- the value of the
change
record component
-
relatives
Returns the value of therelatives
record component.- Returns:
- the value of the
relatives
record component
-