OGTOOLS

Minecraft /item command

Places, copies or transforms an item in a specific inventory or armor slot.

🎒 Item commands Operator (level 2) Needs cheats enabled Java Edition 26.3

Syntax

/item replace entity <targets> <slot> with <item> [<count>]
/item replace block <pos> <slot> with <item> [<count>]
/item modify entity <targets> <slot> <modifier>

Parts in square brackets are optional, parts in angle brackets are required. You do not type the brackets: Put your own value in their place.

Arguments

ArgumentWhat it does
<slot> Slot name: weapon.mainhand, armor.head, hotbar.0, container.5 and so on.
replace / modify Overwrites the slot or applies a modifier from a data pack.

Examples

/item replace entity @s armor.head with diamond_helmet

Puts a diamond helmet on your head.

/item replace entity @s weapon.mainhand with air

Deletes the item in your hand.

/item replace block ~ ~-1 ~ container.0 with diamond 5

Puts 5 diamonds in the first slot of the chest under your feet.

Good to know

  • give adds to the inventory, while item changes the slot you choose: That is the difference.
  • It replaced the replaceitem command in 1.17.

How do I run this command?

Press T in game to open chat (or press / directly), type the command and press Enter. While typing, Tab completes the options. This command counts as a cheat: It needs cheats enabled in a singleplayer world, and operator permission on a server (operator (level 2)).

Related commands

🎒 More Item commands

Another tool Minecraft crafting recipes Would rather make the item than give it with a command? See the recipe on the 3x3 grid.

Minecraft is a product of Mojang Studios. This tool is an independent helper made for players and is not affiliated with Mojang or Microsoft.