Minecraft /item command

Java EditionSince Java 1.17 (20w46a)

Quick answer: Puts, modifies or copies items into specific inventory slots of blocks or entities. Syntax: item <modify|replace> <block <pos>|entity <targets>> <slot> ...

/item is the surgical tool for inventories: replace puts an exact item into a slot (a chest slot, a player's hotbar slot, armor and offhand slots), while modify applies an item modifier like a loot table function to whatever is already there. Bedrock Edition does not have /item - its equivalent is /replaceitem.

Syntax

EditionSyntax
Javaitem <modify|replace> <block <pos>|entity <targets>> <slot> ...
Bedrock(Java Edition only - Bedrock uses /replaceitem)

Targets / arguments: Block containers and entity inventory slots. Requires: Cheats enabled / operator level 2.

Examples

/item replace entity @s weapon.mainhand with minecraft:netherite_sword

Put a netherite sword in your main hand

/item replace block 100 64 200 container.0 with minecraft:diamond 64

Fill the first slot of a chest with a stack of diamonds

/item replace entity @s armor.head with minecraft:carved_pumpkin

Equip a carved pumpkin without opening the inventory

Tips

Related commands

/give/loot/clear