Item Builder
Java 26.2
/item
Replace Item
Item Presets
Text
Durability
Enchantments
Adventure Permissions
Potion Contents
Player Head Profile
Attribute Modifiers
Written Book Content
Advanced Components
Tooltip Preview
Diamond Sword
Replace and modify slots
The /item command replaces or modifies a single inventory slot without touching the rest of the inventory, which is what makes it the tool of choice for maps and datapacks. Choose the target slot, the source item or loot table, and the generator writes the replace or modify form for your version.
/give always drops the item into the first free inventory slot; /item replace targets one exact slot (a hotbar slot, an armor slot, or a container slot) without touching the rest of the inventory, which is what maps and datapacks need for precise setups.
Choose a block target and the container slot index, then the source item. /item replace block <x> <y> <z> container.<n> writes the stack into that exact chest, barrel or hopper slot.
Pick a loot-table source instead of an item stack. /item replace ... from loot <table> rolls the table and places the result, which is how you hand out randomized rewards without pre-building the item.
No. /item is a Java-only command; Bedrock uses replaceitem for slots and has no direct loot-table source. The generator marks the command as Java Edition only.
Java 26.2
Item Presets
Tooltip Preview
Diamond Sword