Skip to main content

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

FieldTypeDefaultDescription
itemIdentifierrequiredThe ID of a registered item.
amountInteger1The size of the stack.
tagNBToptionalNBT data of the item.
slotIntegeroptionalThe 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.