← Packet index

Packet 31

MobEquipmentPacket

Mob Equipment. Changes to any mob's held/offhand item are fired from server to client with this packet. Clients also send this to the server when their held slot or its contents change.

Packet datagramWire order
HeaderID 31varuint
0Target Runtime IDActorRuntimeID · variable
1ItemNetworkItemStackDescriptor · variable
2Slotuint8 · 1 byte
3Selected Slotuint8 · 1 byte
4Container IDuint8 · 1 byte

Serialized fields

5 top-level fields
  1. 0Target Runtime IDRuntime ID of the mob or player whose equipment is changing.ActorRuntimeID
    1. 0Actor Runtime IDCompressionvaruint64
  2. 1ItemThe item stack being equipped. Send an empty descriptor to indicate no item.NetworkItemStackDescriptor
  3. 2SlotThe inventory slot index the item occupies within the container.Compressionuint8
  4. 3Selected SlotThe hotbar slot that is currently selected by the player. Matches Slot for non-player mobs.Compressionuint8
  5. 4Container IDIdentifies which container the item belongs to, e.g. inventory or offhand.Compressionuint8

Changelog

Stable releases

Changes between stable protocol releases.

No stable release changes are recorded for this packet.