跳转至

InventoryContentPacket

文档版本:r/21_u4
协议版本:748

InventoryContentPacket数据包,数字ID49。该数据包用于protocol.packet.inventorycontentpacket.description

结构



InventoryContentPacket




0

InventoryContentPacket




1

Inventory Id



0->1






3

Slots



0->3






9

Full Container Name



0->9






19

Storage Item



0->19






2

unsigned varint



1->2






4

Array Size



3->4






6

example element



3->6






5

unsigned varint



4->5






7

Item stack



6->7






8

NetworkItemStackDescriptor



7->8






18

FullContainerName



9->18






20

NetworkItemStackDescriptor



19->20




字段

InventoryContentPacket
[inventory_id][slots][full_container_name][storage_item]
Inventory Id:unsigned varint
基本类型。protocol.packet.inventorycontentpacket.inventory_id.description
Slots
[array_size][[example_element]..]
数组大小:unsigned varint
基本类型。protocol.packet.inventorycontentpacket.slots.array_size.description
示例元素
[item_stack]
Item stack:NetworkItemStackDescriptor
特殊类型。protocol.packet.inventorycontentpacket.slots.example_element.item_stack.description
Full Container Name:FullContainerName
特殊类型。protocol.packet.inventorycontentpacket.full_container_name.descriptionUsed to reference a specific container within a given screen container context.
Storage Item:NetworkItemStackDescriptor
特殊类型。protocol.packet.inventorycontentpacket.storage_item.descriptionOptional storage item containing the contents to set. Only the item type is relevant, not any stack information.