Record Class ClientboundSetEntityDataPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundSetEntityDataPacket(int id, List<SynchedEntityData.DataValue<?>> packedItems)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
private final int
The field for theid
record component.private final List<SynchedEntityData.DataValue<?>>
The field for thepackedItems
record component. -
Constructor Summary
ConstructorDescriptionClientboundSetEntityDataPacket
(int id, List<SynchedEntityData.DataValue<?>> packedItems) Creates an instance of aClientboundSetEntityDataPacket
record class.ClientboundSetEntityDataPacket
(FriendlyByteBuf p_179290_) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.void
handle
(ClientGamePacketListener p_133155_) final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of theid
record component.private static void
pack
(List<SynchedEntityData.DataValue<?>> p_253940_, FriendlyByteBuf p_253901_) Returns the value of thepackedItems
record component.final String
toString()
Returns a string representation of this record class.private static List<SynchedEntityData.DataValue<?>>
unpack
(FriendlyByteBuf p_253726_) void
write
(FriendlyByteBuf p_133158_) 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
-
Field Details
-
id
private final int idThe field for theid
record component. -
packedItems
The field for thepackedItems
record component. -
EOF_MARKER
public static final int EOF_MARKER- See Also:
-
-
Constructor Details
-
ClientboundSetEntityDataPacket
-
ClientboundSetEntityDataPacket
Creates an instance of aClientboundSetEntityDataPacket
record class.- Parameters:
id
- the value for theid
record componentpackedItems
- the value for thepackedItems
record component
-
-
Method Details
-
pack
-
unpack
-
write
- Specified by:
write
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
-
packedItems
Returns the value of thepackedItems
record component.- Returns:
- the value of the
packedItems
record component
-