Commands/loot

Drops the given loot table into the specified inventory or into the world.
==Syntax==
* Java Edition
: loot <TARGET> <SOURCE>
::In which:
::<TARGET> is:
::: give <players>
:::: Gives items to players, ignoring empty item stacks.
::: insert <targetPos>
:::: Distributes items to a container block.
::: spawn <targetPos>
:::: Spawns item entities.
::: replace block <targetPos> <slot> [<count>]
:::: Distributes items to a container block.
::: replace entity <entities> <slot> [<count>]
:::: Distributes items to entities.
::<SOURCE> is:
::: fish <loot_table> <pos> [<tool>|mainhand|offhand]
::: loot <loot_table>
::: kill <target>
::: mine <pos> [<tool>|mainhand|offhand]
* Bedrock Edition
: loot <TARGET> <SOURCE>
::In which:
::<TARGET> is:
::: give <player: target>
:::: Gives items to players, ignoring empty item stacks.
::: insert <position: x y z>
:::: Distributes items to a container block, ignoring empty item stacks.
::: spawn <position: x y z>
:::: Spawns item entities, ignoring empty item stacks.
::: replace block <position: x y z> slot.container <slotId: int> [count: int]
:::: Distributes items to a container block.
:::replace entity <entity: target> <slotType: EntityEquipmentSlot> <slotId: int> [count: int]
::::Distributes items to entities.
::<SOURCE> is:
:::kill <entity: target> ["<tool>|mainhand|offhand": string]
:::loot <loot_table: string> ["<tool>|mainhand|offhand": string]
==Arguments==
 
:Specifies which loot table to use.
:, 
:, And it refers to a loot table with the path of "loot_tables/loot_table: string.json".
: 
:Specifies a tool to mine or fish.
:
: 
:Specifies a tool to be used to kill or loot.
: Can be mainhand and offhand, otherwise it represents an item id.
 (in kill source)
: Specifies one entity to kill simulatively.
:
 
:Specifies one or more players to give.
:
: and (in replace block and insert mode)
: (in replace block and insert mode) 
:Specifies the position of a block.
:: 
:: 
 (in spawn mode) 
:Specifies the location where item drops.
:
 
:Specifies one or more entities to modify.
:
 
:Specifies the number of consecutive slots to be filled.
:
: 
: , slot.container, and 
:Specifies the inventory slot to be modified.
:
==Result==
==Output==
== See also==
* — give specific items to players without specifying a loot table
* — modify specific item slots of entities or container
* — modify specific item slots of entities or container
==History==
de:Befehl/loot
es:Comandos/loot
ja:コマンド/loot
zh:命令/loot