Generate and Distribute Loot Table Items
The /loot command lets you generate items from loot tables, simulated block mining, fishing, or entity drops, and place those items directly into player inventories or block containers.
Map makers and server operators use this command to reward players with randomized items, test custom data pack loot tables, or restock container blocks at specific coordinates.
/loot give <players> fish <loot_table> <pos>/loot give <players> fish <loot_table> <pos> <tool>/loot give <players> fish <loot_table> <pos> mainhand/loot give <players> fish <loot_table> <pos> offhand/loot give <players> kill <target>/loot give <players> loot <loot_table>/loot give <players> mine <pos>/loot give <players> mine <pos> <tool>/loot give <players> mine <pos> mainhand/loot give <players> mine <pos> offhand/loot insert <targetPos> fish <loot_table> <pos>/loot insert <targetPos> fish <loot_table> <pos> <tool>/loot insert <targetPos> fish <loot_table> <pos> mainhand/loot insert <targetPos> fish <loot_table> <pos> offhand/loot insert <targetPos> kill <target>/loot insert <targetPos> loot <loot_table>/loot insert <targetPos> mine <pos>/loot insert <targetPos> mine <pos> <tool>/loot insert <targetPos> mine <pos> mainhand/loot insert <targetPos> mine <pos> offhand/loot replace block <targetPos> <slot> <count> fish <loot_table> <pos>/loot replace block <targetPos> <slot> <count> fish <loot_table> <pos> <tool>/loot replace block <targetPos> <slot> <count> fish <loot_table> <pos> mainhand/loot replace block <targetPos> <slot> <count> fish <loot_table> <pos> offhand/loot replace block <targetPos> <slot> <count> kill <target>/loot replace block <targetPos> <slot> <count> loot <loot_table>/loot replace block <targetPos> <slot> <count> mine <pos>/loot replace block <targetPos> <slot> <count> mine <pos> <tool>/loot replace block <targetPos> <slot> <count> mine <pos> mainhand/loot replace block <targetPos> <slot> <count> mine <pos> offhand/loot replace block <targetPos> <slot> fish <loot_table> <pos>/loot replace block <targetPos> <slot> fish <loot_table> <pos> <tool>/loot replace block <targetPos> <slot> fish <loot_table> <pos> mainhand/loot replace block <targetPos> <slot> fish <loot_table> <pos> offhand/loot replace block <targetPos> <slot> kill <target>/loot replace block <targetPos> <slot> loot <loot_table>/loot replace block <targetPos> <slot> mine <pos>/loot replace block <targetPos> <slot> mine <pos> <tool>/loot replace block <targetPos> <slot> mine <pos> mainhand/loot replace block <targetPos> <slot> mine <pos> offhand/loot replace entity <entities> <slot> <count> fish <loot_table> <pos>/loot replace entity <entities> <slot> <count> fish <loot_table> <pos> <tool>/loot replace entity <entities> <slot> <count> fish <loot_table> <pos> mainhand/loot replace entity <entities> <slot> <count> fish <loot_table> <pos> offhand/loot replace entity <entities> <slot> <count> kill <target>/loot replace entity <entities> <slot> <count> loot <loot_table>/loot replace entity <entities> <slot> <count> mine <pos>/loot replace entity <entities> <slot> <count> mine <pos> <tool>/loot replace entity <entities> <slot> <count> mine <pos> mainhand/loot replace entity <entities> <slot> <count> mine <pos> offhand/loot replace entity <entities> <slot> fish <loot_table> <pos>/loot replace entity <entities> <slot> fish <loot_table> <pos> <tool>/loot replace entity <entities> <slot> fish <loot_table> <pos> mainhand/loot replace entity <entities> <slot> fish <loot_table> <pos> offhand/loot replace entity <entities> <slot> kill <target>/loot replace entity <entities> <slot> loot <loot_table>/loot replace entity <entities> <slot> mine <pos>/loot replace entity <entities> <slot> mine <pos> <tool>/loot replace entity <entities> <slot> mine <pos> mainhand/loot replace entity <entities> <slot> mine <pos> offhand/loot spawn <targetPos> fish <loot_table> <pos>/loot spawn <targetPos> fish <loot_table> <pos> <tool>/loot spawn <targetPos> fish <loot_table> <pos> mainhand/loot spawn <targetPos> fish <loot_table> <pos> offhand/loot spawn <targetPos> kill <target>/loot spawn <targetPos> loot <loot_table>/loot spawn <targetPos> mine <pos>/loot spawn <targetPos> mine <pos> <tool>/loot spawn <targetPos> mine <pos> mainhand/loot spawn <targetPos> mine <pos> offhand/loot give <players> loot <loot_table>/loot give <players> kill <target>/loot give <players> mine <pos> <tool>/loot insert <targetPos> loot <loot_table>/loot insert <targetPos> mine <pos> mainhand/loot replace block <targetPos> <slot> <count> loot <loot_table>/loot replace block <targetPos> <slot> kill <target>| Argument | Type | What it means |
|---|---|---|
<players> | target selector players only | Specifies the player or players who will receive the items, using a player name, UUID, or target selector like @p or @a. |
<loot_table> | loot table | The ID of the loot table used to generate the items. |
<pos> | block position | The three x y z block coordinates where the simulated fishing or mining takes place, supporting ~ for relative and ^ for local positions. |
<tool> | item | An item ID, optionally with components like diamond_sword[enchantments={sharpness:5}], used to simulate mining or fishing. |
<target> | target selector one target | A player name, UUID, or target selector targeting a single entity whose death drops will be simulated. |
<targetPos> | block position | The three x y z coordinates of the target block or position, where ~ and ^ coordinates also work. |
<slot> | slot | The specific inventory slot to replace, such as weapon.mainhand or container.0. |
<count> | whole number at least 0 | A whole number of at least 0 that defines how many consecutive inventory slots to fill or replace. |
<entities> | target selector | A player name, UUID, or target selector such as @e or @s that selects entities. |
<targetPos> | position | The three x y z coordinates of the target block or position, where ~ and ^ coordinates also work. |
/loot give @p kill @sGives the nearest player the items that the command executor would drop upon death.
/loot give @a mine ~ ~-1 ~Gives all players the drops from mining the block directly below the command execution point.
/loot give @s mine 10 64 10 diamond_sword[enchantments={sharpness:5}]Gives the executing player the drops from mining the block at 10 64 10 using a Sharpness 5 diamond sword.
/loot insert ~1 ~ ~ kill @rSimulates the death drops of a random player and inserts the resulting items into a container block one block to the east.
/loot insert 0 70 0 mine ^ ^ ^2 mainhandSimulates mining the block two blocks in front of the executor with their mainhand item and puts the drops into a container at 0 70 0.
/loot replace block ~ ~1 ~ container.0 mine ~ ~2 ~ offhandReplaces the first slot of a container above you with the drops from mining the block two blocks above you using your offhand item.
/loot replace block 25 80 -15 container.0 5 kill @pReplaces 5 slots starting at container.0 in the block at 25 80 -15 with the simulated death drops of the nearest player.
Measured from the game files of every Java release from 1.13 to 26.3.
Bedrock Edition also includes the /loot command, supporting forms such as /loot spawn and /loot give with loot, kill, and mine sources, plus an optional tool, mainhand, or offhand parameter at the end of those forms.
The /loot command was added to Minecraft Java Edition in version 1.14.
You need permission level 2, which means you must be an operator on a server or have cheats turned on in a single-player world.
No, the kill <target> option only simulates what the target would drop if killed and generates those items without damaging the entity.