Loot Command Generator — /loot give, spawn, insert, replace (Java Edition)
Run these from an operator’s chat, a command block, or a function file. Execute is simplified here — chain the rows in the order you want them to run.
How to Use the Loot Command Generator
- Open the Loot tab.
- Pick a target – where the generated loot ends up:
give <players>drops it straight into an inventory,insert <pos>puts it into a container,spawn <pos>drops it as item entities in the world,replace block <pos> <slot>orreplace entity <target> <slot>overwrites one specific slot. - Pick a source – where the loot comes from: a
loot <lootTable>table,kill <target>(what that entity would drop if killed right now),mine <pos>(what breaking that block would drop, with an optional tool), orfish <lootTable> <pos>(with an optional tool item). - Fill in the fields that appear for your target/source combination.
- Copy the generated
/lootcommand into a command block, function, or an operator’s chat.
Command Syntax Reference
/loot give <players> <source> /loot insert <pos> <source> /loot spawn <pos> <source> /loot replace block <pos> <slot> <source> /loot replace entity <target> <slot> <source> where <source> is one of: loot <lootTable> kill <target> mine <pos> [<tool>] fish <lootTable> <pos> [<tool>]
/loot rolls an actual loot table (Minecraft’s weighted-random item system) and delivers the result via whichever target you picked, without needing the triggering event to really happen. loot <lootTable> rolls any loot table directly by ID, e.g. minecraft:chests/simple_dungeon. kill <target> rolls exactly the loot table that entity would use if it died right now – including any Looting-style bonuses from context – without actually killing it. mine <pos> rolls the block’s own loot table as if it were broken, and the optional tool argument matters because tool-gated drops (Silk Touch, Fortune) depend on what’s used to break it. fish <lootTable> <pos> rolls a fishing-style table with an optional tool (e.g. minecraft:fishing_rod) affecting luck-based entries.
Frequently Asked Questions
What’s the difference between loot give and loot spawn?
give <players> puts the rolled items directly into a player’s inventory (or drops them at their feet if the inventory is full), while spawn <pos> always creates physical item entities on the ground at a position, regardless of whether anyone is nearby to pick them up. Use give for a reward command a player runs on themselves; use spawn to scatter loot in the world, e.g. after a boss fight.
How does loot kill <target> differ from actually running /kill on the entity?
loot kill only rolls the entity’s death loot table and delivers it via your chosen target – the entity itself is untouched and keeps existing. Running /kill actually removes the entity and lets its normal death event fire (which also drops loot, but into the world at its death position, not wherever you choose).
Why does the mine source have an optional tool argument?
Many blocks’ loot tables branch on the tool used to break them – a block might only drop itself with Silk Touch, or drop more copies with a higher Fortune level. Supplying a tool item (like minecraft:diamond_pickaxe with the right enchantments in its NBT) lets /loot mine accurately simulate breaking the block with that specific tool instead of assuming no tool at all.
What’s the difference between replace block and replace entity?
replace block <pos> <slot> overwrites one numbered slot in a container block, like a chest at a position. replace entity <target> <slot> overwrites one slot in an entity’s inventory instead, such as a player’s hotbar slot or a horse’s saddle slot – same rolled loot, different kind of destination.
Can a single /loot command produce more than one item?
Yes – most loot tables can roll multiple pools and multiple entries per pool, so a single /loot command commonly delivers several different item stacks at once (all of them going to the same target you picked). This is normal loot-table behavior and not something the command itself limits to one item.
Related Tools
- Item Command Generator – put one specific, fixed item into a slot instead of rolling a loot table.
- Data Command Generator – inspect or tweak the NBT of items after they’re rolled.
- Execute Command Generator – run
/lootas a specific entity or at a specific position withexecute as/at.