Class InventoryS2CPacket
java.lang.Object
net.minecraft.network.packet.s2c.play.InventoryS2CPacket
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public class InventoryS2CPacket extends Object implements Packet<ClientPlayPacketListener>
Represents the contents of a block or entity inventory being synchronized
from the server to the client.
-
Field Summary
Fields Modifier and Type Field Description private List<ItemStack>contentsprivate intsyncIdTheScreenHandler.syncIdof a screen handler. -
Constructor Summary
Constructors Constructor Description InventoryS2CPacket()InventoryS2CPacket(int syncId, DefaultedList<ItemStack> contents) -
Method Summary
Modifier and Type Method Description voidapply(ClientPlayPacketListener clientPlayPacketListener)List<ItemStack>getContents()intgetSyncId()voidread(PacketByteBuf buf)voidwrite(PacketByteBuf buf)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.Packet
isWritingErrorSkippable
-
Field Details
-
syncId
private int syncIdTheScreenHandler.syncIdof a screen handler. -
contents
-
-
Constructor Details
-
InventoryS2CPacket
public InventoryS2CPacket() -
InventoryS2CPacket
-
-
Method Details
-
read
- Specified by:
readin interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
write
- Specified by:
writein interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
apply
- Specified by:
applyin interfacePacket<ClientPlayPacketListener>
-
getSyncId
@Environment(CLIENT) public int getSyncId() -
getContents
-