Minecraft:Loot context
More actions
A loot context is a set of parameters available to Minecraft:loot tables, Minecraft:predicates, Minecraft:item modifiers, Minecraft:number providers, and Minecraft:slot sources.
When evaluating these data types in different situations, different parameters will be available. For example, a loot table that runs when the player mines a block would get a tool parameter if the player used an item to do it, but a loot table that populates a treasure chest would never get a tool parameter. Loot contexts are Minecraft:identifiers describing which parameters are available in specific situations. If one is set as the Template:Nbt of a loot table, it can be used to check whether the loot table depends on parameters that will never be available in its intended use case, allowing the game to report a problem when the Minecraft:data pack is loaded.
Loot context types and uses
Used for loot tables
These loot context types are used for evaluating Minecraft:loot tables, and other data types when they appear inside of loot tables.
| Loot context type | When it is used | Loot context parameters that are supplied | Loot context parameters that may be supplied |
|---|---|---|---|
| Template:Cdanchor |
|
None | None |
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
N/A | N/A |
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
Not used in loot tables
These loot contexts are not used to evaluate loot tables. Instead, they are used for other invocations of Minecraft:predicates, Minecraft:item modifiers, Minecraft:slot sourcesTemplate:Upcoming, and Minecraft:number providersTemplate:Upcoming.
| Loot context type | When it is used | Loot context parameters that are supplied | Loot context parameters that may be supplied |
|---|---|---|---|
| Template:Cdanchor |
|
|
|
| Template:CdanchorTemplate:Upcoming |
|
|
|
| Template:CdanchorTemplate:Upcoming |
|
|
|
| Template:CdanchorTemplate:Upcoming |
|
|
|
| Template:CdanchorTemplate:Upcoming |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:CdanchorTemplate:Upcoming |
|
|
|
| Template:Cdanchor |
|
|
|
| Template:Cdanchor |
|
||
| Template:Cdanchor |
|
||
| Template:Cdanchor |
|
||
| Template:Cdanchor |
|
||
| Template:Cdanchor | Used for evaluating villager trades. |
|
|
Template:Navbox Java Edition technical
Minecraft:de:Beutekontext Minecraft:fr:Contexte de butin Minecraft:ja:ルート文脈 Minecraft:pt:Contexto de saque Minecraft:zh:战利品上下文