MCTOOLBOX
MC ToolboxMC TOOLBOX

Minecraft /item Command Generator

Java Edition /item replace and /item modify for entity and block inventory slots — full slot list from the wiki and the complete vanilla item registry. Prefer this over removed /replaceitem.

Command builder
Target selector
Selector: @p

Registry size: 1537 · minecraft:diamond_sword

Generated command
/item command

Items in registry: 1537 · Entity slots: 93 · Block slots: 55

Inventory control without legacy replaceitem

Java Edition moved inventory editing to /item. Targets are either entity <selector> or block <x y z>, then a slot such as weapon.mainhand, armor.chest, hotbar.0–8, inventory.0–26, enderchest.0–26, horse.0–14, container.0–53, or contents for single-slot holders.

replace … with places a stack you specify (count 1–99, limited by max stack). replace … from copies from another entity or block slot and can append an item modifier. modify runs a datapack item modifier (resource location) on whatever is already in the slot.

This tool lists 1537 vanilla items (registry) and every command slot name from the wiki Slot page. Pair with the /give generator when you need a full custom item definition first, then /item to place it without clearing the rest of the inventory.

Entity and block targets

Build selectors for players and mobs, or point at a block position for container slots. Source and target can differ.

Complete slot list

weapon, armor.*, hotbar, inventory, enderchest, horse, player.cursor, player.crafting, container.0–53, contents — with free-text override for edge cases.

Full item registry + components

Searchable item picker over the full vanilla list, optional component suffix, and count clamped to 1–99 per wiki.

Java /item patterns you will use most

replace with — /item replace entity|block <target> <slot> with <item> [count]

replace from — /item replace … from entity|block <source> <sourceSlot> [modifier]

modify — /item modify entity|block <target> <slot> <modifier>

Slot names are edition- and version-sensitive. If a slot rejects the command, verify the entity type actually has that slot (for example horse slots on horses only).

Item ids are namespaced (minecraft:…). Components use [component=…] syntax on modern Java versions.

How to use this tool

  1. Pick replace with, replace from, or modify.
  2. Choose an entity selector or block position and the destination slot.
  3. Provide the item stack, source slot, or modifier id, then copy the command.

/item FAQ

What replaced /replaceitem?

/item is the modern Java command for inventory writes. Older maps using /replaceitem should migrate to /item replace with equivalent slots.

Can I edit a chest without opening it?

Yes. Use block mode with the chest coordinates and container.N slots. Always stand in a loaded chunk and confirm the block is a container.

How do item modifiers work?

Modifiers are datapack JSON under data/<namespace>/item_modifier. modify runs that definition against the stack already in the slot.

What is the count range?

Wiki: integer 1–99 inclusive for /item replace … with. The game still fails if the count exceeds the item max stack size.

Does this work on Bedrock?

No. Bedrock inventory commands differ (/replaceitem). This generator emits Java Edition /item grammar.