ItemUseInventoryTransaction
0ActionsInventoryTransaction · variable
1Action Typevarint32 · variable (up to 5 bytes)
2Trigger Typeuint8 · 1 byte
3PositionBlockPos · variable
4Faceuint8 · 1 byte
5Slotvarint32 · variable (up to 5 bytes)
6Handuint8 · 1 byte
7ItemNetworkItemStackDescriptor · variable
8From PositionVec3 · variable
9Click PositionVec3 · variable
10Target Block Idvaruint32 · variable (up to 5 bytes)
11Client Interact Predictionuint8 · 1 byte
12Client Cooldown Stateuint8 · 1 byte
Fields
13 top-level fields0ActionsBase inventory actions. Lists the inventory slot changes associated with this transaction.InventoryTransaction
0ActionsList of inventory slot changes. Each action describes which container slot is changing and what the item descriptor transitions from and to.InventoryActionas
array<InventoryAction>0SourceThe inventory source identifying which container this action targets.InventorySource
0Source TypeThe inventory source type.CompressionEnum-as-ValueInventorySourceTypeas
varuint32- 0
Container Inventory - 1
Global Inventory - 2
World Interaction - 3
Creative Inventory - 4
Non Implemented Feature TODO
- 0
2Bit FlagsoptionalSource flags. Present only for WorldInteraction source type.CompressionEnum-as-ValueInventorySourceFlagsas
varuint32- 0
No Flag - 1
World Interaction Random
- 0
- 1SlotThe slot index within the source container.Compression
varuint32 - 2From ItemThe item descriptor representing the state of the slot before this action.NetworkItemStackDescriptor
- 3To ItemThe item descriptor representing the desired state of the slot after this action.NetworkItemStackDescriptor
1Action TypeThe type of item use action performed.CompressionEnum-as-ValueItemUseActionTypeas
varint32- 0
Place - 1
Use - 2
Destroy - 3
Use As Attack
- 0
2Trigger TypePlayerInput if a direct result of the player's initial button input. SimulationTick if the player is holding down input from a previous tick.CompressionEnum-as-ValueItemUseTriggerTypeas
uint8- 0
Unknown - 1
Player Input - 2
Simulation Tick
- 0
- 4FaceThe face of the target block that was clicked.Compression
uint8 - 5SlotThe inventory slot of the item being used.Compression
varint32 - 7ItemThe item stack descriptor of the item being used.NetworkItemStackDescriptor
- 10Target Block IdThe runtime block state ID of the target block.Compression
varuint32 11Client Interact PredictionWhether the client predicted the interaction would succeed.Enum-as-ValueItemUsePredictedResultas
uint8- 0
Failure - 1
Success
- 0
12Client Cooldown StateWhether the item is currently on cooldown on the client.Enum-as-ValueItemUseClientCooldownStateas
uint8- 0
Off - 1
On
- 0
Packet references
2 references- InventoryTransactionPacketTransaction › ItemUseInventoryTransaction › ItemUseInventoryTransaction
- PlayerAuthInputPacketItem Use Transaction › PackedItemUseLegacyInventoryTransaction › Item Use Transaction › ItemUseInventoryTransaction
Changelog
Stable releases
Changes between stable protocol releases.
- Released
- Protocol
- 2193
Changed 1
- Added field
Hand(typeuint8). - Moved
Itemfrom field 6 to 7. - Moved
From Positionfrom field 7 to 8. - Moved
Click Positionfrom field 8 to 9. - Moved
Target Block Idfrom field 9 to 10. - Moved
Client Interact Predictionfrom field 10 to 11. - Moved
Client Cooldown Statefrom field 11 to 12.
All builds
Changes between consecutive stable releases and preview builds.
- Released
- Protocol
- 2192
- Previous build
- 1.26.50-preview.25
Changed 1
- Added field
Hand(typeuint8). - Moved
Itemfrom field 6 to 7. - Moved
From Positionfrom field 7 to 8. - Moved
Click Positionfrom field 8 to 9. - Moved
Target Block Idfrom field 9 to 10. - Moved
Client Interact Predictionfrom field 10 to 11. - Moved
Client Cooldown Statefrom field 11 to 12.