/loot Command in Minecraft Java Edition

Generate and Distribute Loot Table Items

Java EditionItems & InventoryPermission: Level 2Added in 1.14Bedrock version →

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.

Syntax (Java 26.3, 70 forms)

  1. /loot give <players> fish <loot_table> <pos>
  2. /loot give <players> fish <loot_table> <pos> <tool>
  3. /loot give <players> fish <loot_table> <pos> mainhand
  4. /loot give <players> fish <loot_table> <pos> offhand
  5. /loot give <players> kill <target>
  6. /loot give <players> loot <loot_table>
  7. /loot give <players> mine <pos>
  8. /loot give <players> mine <pos> <tool>
  9. /loot give <players> mine <pos> mainhand
  10. /loot give <players> mine <pos> offhand
  11. /loot insert <targetPos> fish <loot_table> <pos>
  12. /loot insert <targetPos> fish <loot_table> <pos> <tool>
  13. /loot insert <targetPos> fish <loot_table> <pos> mainhand
  14. /loot insert <targetPos> fish <loot_table> <pos> offhand
  15. /loot insert <targetPos> kill <target>
  16. /loot insert <targetPos> loot <loot_table>
  17. /loot insert <targetPos> mine <pos>
  18. /loot insert <targetPos> mine <pos> <tool>
  19. /loot insert <targetPos> mine <pos> mainhand
  20. /loot insert <targetPos> mine <pos> offhand
  21. /loot replace block <targetPos> <slot> <count> fish <loot_table> <pos>
  22. /loot replace block <targetPos> <slot> <count> fish <loot_table> <pos> <tool>
  23. /loot replace block <targetPos> <slot> <count> fish <loot_table> <pos> mainhand
  24. /loot replace block <targetPos> <slot> <count> fish <loot_table> <pos> offhand
  25. /loot replace block <targetPos> <slot> <count> kill <target>
  26. /loot replace block <targetPos> <slot> <count> loot <loot_table>
  27. /loot replace block <targetPos> <slot> <count> mine <pos>
  28. /loot replace block <targetPos> <slot> <count> mine <pos> <tool>
  29. /loot replace block <targetPos> <slot> <count> mine <pos> mainhand
  30. /loot replace block <targetPos> <slot> <count> mine <pos> offhand
  31. /loot replace block <targetPos> <slot> fish <loot_table> <pos>
  32. /loot replace block <targetPos> <slot> fish <loot_table> <pos> <tool>
  33. /loot replace block <targetPos> <slot> fish <loot_table> <pos> mainhand
  34. /loot replace block <targetPos> <slot> fish <loot_table> <pos> offhand
  35. /loot replace block <targetPos> <slot> kill <target>
  36. /loot replace block <targetPos> <slot> loot <loot_table>
  37. /loot replace block <targetPos> <slot> mine <pos>
  38. /loot replace block <targetPos> <slot> mine <pos> <tool>
  39. /loot replace block <targetPos> <slot> mine <pos> mainhand
  40. /loot replace block <targetPos> <slot> mine <pos> offhand
  41. /loot replace entity <entities> <slot> <count> fish <loot_table> <pos>
  42. /loot replace entity <entities> <slot> <count> fish <loot_table> <pos> <tool>
  43. /loot replace entity <entities> <slot> <count> fish <loot_table> <pos> mainhand
  44. /loot replace entity <entities> <slot> <count> fish <loot_table> <pos> offhand
  45. /loot replace entity <entities> <slot> <count> kill <target>
  46. /loot replace entity <entities> <slot> <count> loot <loot_table>
  47. /loot replace entity <entities> <slot> <count> mine <pos>
  48. /loot replace entity <entities> <slot> <count> mine <pos> <tool>
  49. /loot replace entity <entities> <slot> <count> mine <pos> mainhand
  50. /loot replace entity <entities> <slot> <count> mine <pos> offhand
  51. /loot replace entity <entities> <slot> fish <loot_table> <pos>
  52. /loot replace entity <entities> <slot> fish <loot_table> <pos> <tool>
  53. /loot replace entity <entities> <slot> fish <loot_table> <pos> mainhand
  54. /loot replace entity <entities> <slot> fish <loot_table> <pos> offhand
  55. /loot replace entity <entities> <slot> kill <target>
  56. /loot replace entity <entities> <slot> loot <loot_table>
  57. /loot replace entity <entities> <slot> mine <pos>
  58. /loot replace entity <entities> <slot> mine <pos> <tool>
  59. /loot replace entity <entities> <slot> mine <pos> mainhand
  60. /loot replace entity <entities> <slot> mine <pos> offhand
  61. /loot spawn <targetPos> fish <loot_table> <pos>
  62. /loot spawn <targetPos> fish <loot_table> <pos> <tool>
  63. /loot spawn <targetPos> fish <loot_table> <pos> mainhand
  64. /loot spawn <targetPos> fish <loot_table> <pos> offhand
  65. /loot spawn <targetPos> kill <target>
  66. /loot spawn <targetPos> loot <loot_table>
  67. /loot spawn <targetPos> mine <pos>
  68. /loot spawn <targetPos> mine <pos> <tool>
  69. /loot spawn <targetPos> mine <pos> mainhand
  70. /loot spawn <targetPos> mine <pos> offhand

The forms you will use most

/loot give <players> loot <loot_table>
Gives items generated directly from a specific loot table to one or more players.
/loot give <players> kill <target>
Gives players the items that a specific target entity would drop if it were killed.
/loot give <players> mine <pos> <tool>
Gives players the drops from mining the block at a position using a specified tool.
/loot insert <targetPos> loot <loot_table>
Inserts items from a loot table into a container block at the target position.
/loot insert <targetPos> mine <pos> mainhand
Inserts the drops of a mined block into a container, simulating using the executor's mainhand item.
/loot replace block <targetPos> <slot> <count> loot <loot_table>
Replaces a range of slots in a container block with items generated from a loot table.
/loot replace block <targetPos> <slot> kill <target>
Replaces a starting slot in a container block with the loot drops from a killed target.

Arguments

ArgumentTypeWhat 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 tableThe ID of the loot table used to generate the items.
<pos>block positionThe three x y z block coordinates where the simulated fishing or mining takes place, supporting ~ for relative and ^ for local positions.
<tool>itemAn 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 positionThe three x y z coordinates of the target block or position, where ~ and ^ coordinates also work.
<slot>slotThe 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 selectorA player name, UUID, or target selector such as @e or @s that selects entities.
<targetPos>positionThe three x y z coordinates of the target block or position, where ~ and ^ coordinates also work.

Examples

Version history

Measured from the game files of every Java release from 1.13 to 26.3.

  1. 1.14 Command added.

Tips

Common mistakes

Java vs Bedrock

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.

See /loot in Bedrock Edition →

FAQ

When was the /loot command added to Minecraft Java Edition?

The /loot command was added to Minecraft Java Edition in version 1.14.

What permission level do I need to use /loot?

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.

Does killing an entity with /loot actually harm the entity?

No, the kill <target> option only simulates what the target would drop if killed and generates those items without damaging the entity.

Related commands

/clear/enchant/give/item/recipe