Positioned Item Stack (Data Type)
An Object that describes a new item stack along with a position in an inventory. It is an Item Stack with a slot field.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
item | Identifier | required | The ID of a registered item. |
amount | Integer | 1 | The size of the stack. |
tag | NBT | optional | NBT data of the item. |
slot | Integer | optional | The inventory slot the stack goes in. Without it, the stack goes in the first free slot. |
Examples
"stack": {
"item": "minecraft:shield",
"slot": 40
}A shield placed in the offhand slot of a player's inventory.