Loot context type
|
When it is used
|
Loot context parameters that are supplied
|
Loot context parameters that may be supplied
|
empty |
- Used only by the hardcoded empty loot table. Supplies no loot context parameters.
- Specifying
"type":"empty" means no context parameters can be used in this loot table.
|
None |
None
|
chest |
- Opening of a container with loot table (can be
barrel, chest, trapped chest, hopper, minecart with chest, boat with chest, minecart with hopper, dispenser, dropper, shulker box, dyed shulker box, and decorated pot).
- The command
/loot … loot <loot_table> .
|
- Origin: The center of the chest.
|
this entity: The entity that opened the chest.
|
fishing |
|
- Origin: The position of the fishing bobber.
- Tool: The fishing rod item that the player cast
|
this entity: The fishing bobber.
|
entity |
- Loot from a living entity's death.
- The command
/loot … kill <target> .
|
this entity: The entity that died.
- Origin: The location of the entity's death.
- Damage source: The source of the damage that caused the entity to die.
|
attacker entity: The entity that was the source of the final damage to the victim entity.
direct_attacker entity: The entity that directly contacted the victim entity to kill them.
attacking_player entity: The player that most recently damaged the victim entity.
|
equipment |
|
- Origin: The position of the entity being spawned.
this entity: The entity being spawned.
|
|
archaeology |
|
- Origin: The center of the suspicious block.
|
this entity: The entity that used the brush on the suspicious block.
|
vault |
- Display of items inside of a
vault.
- Opening of a
vault.
|
- Origin: The center of the vault.
|
this entity: The entity that opened the vault. Not present for item display inside vaults.
|
gift |
- Gift from a cat, villager or sniffer.
- Item laid by a chicken.
|
- Origin: The cat, villager or sniffer's location.
this entity: The cat, villager or sniffer that gave the gift. / The chicken that laid the item.
|
|
barter |
|
this entity: The piglin bartered with.
|
|
advancement_reward |
|
this entity: The player that gained the advancement.
- Origin: The player's location when they gained the advancement.
|
|
generic |
- Not used. Supplies all loot context parameters.
- Specifying
"type":"generic" or omitting it means no checking for context parameters in this loot table when loading the data pack.
|
N/A |
N/A
|
block |
- Loot from mining a block.
- Loot from a block being exploded.
- The command
/loot … mine <pos> .
|
- Block state: The block that was broken.
- Origin: The center of the broken block.
- Tool: The tool used to mine the block.
|
this entity: The player that mined the block, or the entity that caused the explosion.
- Block entity: Any block entity data of the block that was broken, if it was a block entity.
- Explosion radius: The radius of the explosion that broke the block, if broken via an explosion.
|
shearing |
|
- Origin: The position of the entity being sheared.
|
this entity: The entity being sheared.
|