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
FieldsModifier and TypeFieldDescriptionstatic final intprivate final intThe field for theidrecord component.private final List<SynchedEntityData.DataValue<?>>The field for thepackedItemsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundSetEntityDataPacket(int id, List<SynchedEntityData.DataValue<?>> packedItems) Creates an instance of aClientboundSetEntityDataPacketrecord class.ClientboundSetEntityDataPacket(FriendlyByteBuf p_179290_) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener p_133155_) final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.private static voidpack(List<SynchedEntityData.DataValue<?>> p_253940_, FriendlyByteBuf p_253901_) Returns the value of thepackedItemsrecord component.final StringtoString()Returns a string representation of this record class.private static List<SynchedEntityData.DataValue<?>>unpack(FriendlyByteBuf p_253726_) voidwrite(FriendlyByteBuf p_133158_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.Packet
isSkippable
-
Field Details
-
id
private final int idThe field for theidrecord component. -
packedItems
The field for thepackedItemsrecord component. -
EOF_MARKER
public static final int EOF_MARKER- See Also:
-
-
Constructor Details
-
ClientboundSetEntityDataPacket
-
ClientboundSetEntityDataPacket
Creates an instance of aClientboundSetEntityDataPacketrecord class.- Parameters:
id- the value for theidrecord componentpackedItems- the value for thepackedItemsrecord component
-
-
Method Details
-
pack
-
unpack
-
write
- Specified by:
writein interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handlein 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 theidrecord component.- Returns:
- the value of the
idrecord component
-
packedItems
Returns the value of thepackedItemsrecord component.- Returns:
- the value of the
packedItemsrecord component
-