Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Loot context: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: updated from Minecraft
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{exclusive|java}}
{{exclusive|java}}


A '''loot context''' is a set of parameters available to [[Minecraft:loot table]]s, [[Minecraft:predicate]]s, [[Minecraft:item modifier]]s, and [[Minecraft:number provider]]s. As different uses have different available parameters, a loot context is used to determine if a given loot table or predicate is valid to that use case, allowing this check to be done when the data pack is loaded, rather than at runtime.
A '''loot context''' is a set of parameters available to [[Minecraft:loot table]]s, [[Minecraft:predicate]]s, [[Minecraft:item modifier]]s, [[Minecraft:number provider]]s, 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:identifier]]s describing which parameters are available in specific situations. If one is set as the {{nbt|string|type}} 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 ==
== Loot context types and uses ==


=== Used in loot tables ===
=== Used for loot tables ===
These loot context types are used in [[Minecraft:loot tables]] and can be set as the {{nbt|string|type}} of a loot table.
These loot context types are used for evaluating [[Minecraft:loot tables]], and other data types when they appear inside of loot tables.
{| class="wikitable" data-description="Invocation methods for predicates and loot functions"
{| class="wikitable" data-description="Invocation methods for predicates and loot functions"
! scope="col" | Loot context type
! scope="col" | Loot context type
Line 13: Line 15:
! scope="col" | Loot context parameters that ''may be'' supplied
! scope="col" | Loot context parameters that ''may be'' supplied
|-
|-
| {{cd|empty}} ||  
| {{cdanchor|minecraft:empty}} ||  
* Used only by the hardcoded empty loot table. Supplies no loot context parameters.  
* Used only by the hardcoded empty loot table. Supplies no loot context parameters.  
* Specifying {{cd|"type":"empty"}} means no context parameters can be used in this loot table.
* Specifying {{cd|"type":"empty"}} means no context parameters can be used in this loot table.
| None || None
| None || None
|-
|-
| {{cd|chest}} ||
| {{cdanchor|minecraft:chest}} ||
* Opening of a container with loot table (can be {{BlockLink|barrel}}, {{BlockLink|chest}}, {{BlockLink|trapped chest}}, {{BlockLink|hopper}}, {{EntityLink|minecart with chest}}, {{EntityLink|id=oak boat with chest|boat with chest}}, {{EntityLink|minecart with hopper}}, {{BlockLink|dispenser}}, {{BlockLink|dropper}}, {{BlockLink|shulker box}}, {{BlockLink|id=shulker boxes|link=Dyed Shulker Box|dyed shulker box}}, and {{BlockLink|decorated pot}}).
* Opening of a container with loot table (can be {{BlockLink|barrel}}, {{BlockLink|chest}}, {{BlockLink|trapped chest}}, {{BlockLink|hopper}}, {{EntityLink|minecart with chest}}, {{EntityLink|id=oak boat with chest|boat with chest}}, {{EntityLink|minecart with hopper}}, {{BlockLink|dispenser}}, {{BlockLink|dropper}}, {{BlockLink|shulker box}}, {{BlockLink|id=shulker boxes|link=Dyed Shulker Box|dyed shulker box}}, and {{BlockLink|decorated pot}}).
* The command {{cmd|loot … loot <loot_table>}}.
* The command {{cmd|loot … loot <loot_table>}}.
Line 26: Line 28:
* '''{{cd|this}} entity:''' The entity that opened the chest.
* '''{{cd|this}} entity:''' The entity that opened the chest.
|-
|-
| {{cd|fishing}} ||
| {{cdanchor|minecraft:fishing}} ||
* [[Minecraft:Fishing]].
* [[Minecraft:Fishing]].
* The command {{cmd|loot … fish <loot_table>}}.
* The command {{cmd|loot … fish <loot_table>}}.
Line 35: Line 37:
* '''{{cd|this}} entity:''' The fishing bobber.
* '''{{cd|this}} entity:''' The fishing bobber.
|-
|-
| {{cd|entity}} ||
| {{cdanchor|minecraft:entity}} ||
* Loot from a living entity's death.
* Loot from a living entity's death.
* The command {{cmd|loot … kill <target>}}.
* The command {{cmd|loot … kill <target>}}.
Line 47: Line 49:
* '''{{cd|attacking_player}} entity:''' The player that most recently damaged the victim entity.
* '''{{cd|attacking_player}} entity:''' The player that most recently damaged the victim entity.
|-
|-
| {{cd|equipment}} ||
| {{cdanchor|minecraft:equipment}} ||
* Used when equipping mobs spawned from a [[Minecraft:Monster Spawner]], [[Minecraft:Minecart with Monster Spawner]] or [[Minecraft:Trial Spawner]].
* Used when equipping mobs spawned from a [[Minecraft:Monster Spawner]], [[Minecraft:Minecart with Monster Spawner]] or [[Minecraft:Trial Spawner]].
|
|
Line 54: Line 56:
|
|
|-
|-
| {{cd|archaeology}} ||
| {{cdanchor|minecraft:archaeology}} ||
* Using a [[Minecraft:brush]] on [[Minecraft:suspicious sand]] or [[Minecraft:suspicious gravel]] that has a loot table.
* Using a [[Minecraft:brush]] on [[Minecraft:suspicious sand]] or [[Minecraft:suspicious gravel]] that has a loot table.
|
|
Line 62: Line 64:
|
|
|-
|-
| {{cd|vault}} ||
| {{cdanchor|minecraft:vault}} ||
* Display of items inside of a {{BlockLink|vault}}.
* Display of items inside of a {{BlockLink|vault}}.
* Opening of a {{BlockLink|vault}}.
* Opening of a {{BlockLink|vault}}.
Line 71: Line 73:
* '''Tool:''' The item used as a key.
* '''Tool:''' The item used as a key.
|-
|-
| {{cd|gift}} ||
| {{cdanchor|minecraft:gift}} ||
* Gift from a cat, villager or sniffer.
* Gift from a cat, villager or sniffer.
* Item laid by a chicken.
* Item laid by a chicken.
Line 79: Line 81:
|
|
|-
|-
| {{cd|barter}} ||
| {{cdanchor|minecraft:barter}} ||
* [[Minecraft:Bartering]] with piglins.
* [[Minecraft:Bartering]] with piglins.
|
|
Line 85: Line 87:
|
|
|-
|-
| {{cd|advancement_reward}} ||
| {{cdanchor|minecraft:advancement_reward}} ||
* Loot table set as an [[Minecraft:Advancement/JSON_format|advancement's reward]].
* Loot table set as an [[Minecraft:Advancement/JSON_format|advancement's reward]].
|
|
Line 92: Line 94:
|
|
|-
|-
| {{cd|generic}} ||  
| {{cdanchor|minecraft:generic}} ||  
* Not used. Supplies all loot context parameters.
* Not used. Supplies all loot context parameters.
* Specifying {{cd|"type":"generic"}} or omitting it means no checking for context parameters in this loot table when loading the data pack.
* Specifying {{cd|"type":"generic"}} or omitting it means no checking for context parameters in this loot table when loading the data pack.
| N/A || N/A
| N/A || N/A
|-
|-
| {{cd|block}} ||
| {{cdanchor|minecraft:block}} ||
* Loot from mining a block.
* Loot from mining a block.
* Loot from a block being exploded.
* Loot from a block being exploded.
Line 110: Line 112:
* '''Explosion radius:''' The radius of the explosion that broke the block, if broken via an explosion.
* '''Explosion radius:''' The radius of the explosion that broke the block, if broken via an explosion.
|-
|-
| {{cd|shearing}} ||
| {{cdanchor|minecraft:shearing}} ||
* Shearing a {{EntityLink|bogged}}, {{EntityLink|sheep}}, {{EntityLink|mooshroom}} or {{EntityLink|snow golem}}.
* Shearing a {{EntityLink|bogged}}, {{EntityLink|sheep}}, {{EntityLink|mooshroom}} or {{EntityLink|snow golem}}.
|
|
Line 118: Line 120:
|
|
|-
|-
| {{cd|entity_interact}} ||
| {{cdanchor|minecraft:entity_interact}} ||
* Using a [[Minecraft:brush]] on an {{EntityLink|armadillo}}.
* Using a [[Minecraft:brush]] on an {{EntityLink|armadillo}}.
|
|
Line 126: Line 128:
* '''{{cd|interacting_entity}}:''' The player or entity that interacted.
* '''{{cd|interacting_entity}}:''' The player or entity that interacted.
|-
|-
| {{cd|block_interact}} ||
| {{cdanchor|minecraft:block_interact}} ||
* Harvesting a {{BlockLink|beehive}}, {{BlockLink|cave vines}}, or {{BlockLink|sweet berry bush}}
* Harvesting a {{BlockLink|beehive}}, {{BlockLink|cave vines}}, or {{BlockLink|sweet berry bush}}
* Carving a {{BlockLink|pumpkin}}.
* Carving a {{BlockLink|pumpkin}}.
Line 132: Line 134:
|
|
* '''Block state:''' The block that was interacted with.
* '''Block state:''' The block that was interacted with.
* '''Origin:''' The center of the block that was interacted with.{{upcoming|java 26.3}}
|
|
* '''Block entity:''' Any block entity data of the block that was interacted with, if it is a block entity.
* '''Block entity:''' Any block entity data of the block that was interacted with, if it is a block entity.
Line 138: Line 141:
|}
|}


=== Only used in predicates ===
=== Not used in loot tables ===
These loot contexts cannot be set at type of a loot table. Instead, they are used for other invocation of [[Minecraft:predicate]]s, [[Minecraft:item modifier]]s, [[Minecraft:slot sources]]{{upcoming|java 26.3}}, and [[Minecraft:number provider]]s{{upcoming|java 26.3}}.
These loot contexts are not used to evaluate loot tables. Instead, they are used for other invocations of [[Minecraft:predicate]]s, [[Minecraft:item modifier]]s, [[Minecraft:slot sources]]{{upcoming|java 26.3}}, and [[Minecraft:number provider]]s{{upcoming|java 26.3}}.
{| class="wikitable" data-description="Invocation methods for predicates"
{| class="wikitable" data-description="Invocation methods for predicates"
! scope="col" | Loot context type
! scope="col" | Loot context type
Line 146: Line 149:
! scope="col" | Loot context parameters that ''may be'' supplied
! scope="col" | Loot context parameters that ''may be'' supplied
|-
|-
| {{cd|command}} ||
| {{cdanchor|minecraft:command}} ||
* Used internally to evaluate [[Minecraft:predicate]]s and [[Minecraft:item modifier]]s by commands such as {{cmd|item modify}} or {{cmd|execute (if{{!}}unless) predicate}}.
* Used to evaluate [[Minecraft:predicate]]s and [[Minecraft:item modifier]]s by commands such as {{cmd|item modify}} or {{cmd|execute (if{{!}}unless) predicate}}.
|
* '''Origin:''' The position where the command is run.
|
* '''{{cd|this}} entity:''' The entity that is {{cd|@s}} when the command is run.
|-
| {{cdanchor|minecraft:command_compute_default}}{{upcoming|java 26.3}} ||
* Used to evaluate [[Minecraft:number provider]]s by {{command|compute default}}.
|
* '''Origin:''' The position where the command is run.
|
* '''{{cd|this}} entity:''' The entity that is {{cd|@s}} when the command is run.
|-
| {{cdanchor|minecraft:command_compute_entity}}{{upcoming|java 26.3}} ||
* Used to evaluate [[Minecraft:number provider]]s by {{command|compute entity}}.
|
* '''Origin:''' The position where the command is run.
* '''{{cd|target_entity}}:''' The entity passed to {{command|compute entity}}.
|
* '''{{cd|this}} entity:''' The entity that is {{cd|@s}} when the command is run.
|-
| {{cdanchor|minecraft:command_compute_position}}{{upcoming|java 26.3}} ||
* Used to evaluate [[Minecraft:number provider]]s by {{command|compute block}}.
|  
|  
* '''Origin:''' The position where the command is run.
* '''Origin:''' The position where the command is run.
* '''Block state:''' The current state of the block at the position passed to {{command|compute block}}.
|
|
* '''{{cd|this}} entity:''' The entity that is {{cd|@s}} when the command is run.
* '''{{cd|this}} entity:''' The entity that is {{cd|@s}} when the command is run.
* '''Block entity:''' The block entity of the block passed to {{command|compute block}}, if it was a block entity.
|-
|-
| {{cd|command_slot_source}}{{upcoming|java 26.3}} ||
| {{cdanchor|minecraft:command_slot_source}}{{upcoming|java 26.3}} ||
* Used internally to evaluate [[Minecraft:slot sources]] by commands such as {{cmd|item}} or {{cmd|execute (if{{!}}unless) item}}.
* Used to evaluate [[Minecraft:slot sources]] by commands such as {{cmd|item}} or {{cmd|execute (if{{!}}unless) item}}.
|  
|  
* '''Origin:''' The position where the command is run.
* '''Origin:''' The position where the command is run.
Line 161: Line 188:
* '''{{cd|this}} entity:''' The entity that is {{cd|@s}} when the command is run.
* '''{{cd|this}} entity:''' The entity that is {{cd|@s}} when the command is run.
|-
|-
| {{cd|selector}} ||
| {{cdanchor|minecraft:selector}} ||
* Used internally by the {{cd|predicate}} [[Minecraft:Target selectors|target selector]] argument.
* Used by the {{cd|predicate}} [[Minecraft:Target selectors|target selector]] argument.
|
|
* '''Origin:''' The position of the entity being checked.
* '''Origin:''' The position of the entity being checked.
Line 168: Line 195:
|
|
|-
|-
| {{cd|advancement_entity}} ||
| {{cdanchor|minecraft:advancement_entity}} ||
* Used internally when an advancement invokes a predicate on an entity.
* Used when an advancement invokes a predicate on an entity.
|
|
* '''{{cd|this}} entity:''' The entity being checked.
* '''{{cd|this}} entity:''' The entity being checked.
Line 175: Line 202:
|
|
|-
|-
| {{cd|advancement_location}}||
| {{cdanchor|minecraft:advancement_location}}||
* Used internally when an advancement invokes a predicate on the location of a block where an item was used on.
* Used when an advancement invokes a predicate on the location of a block where an item was used on.
|
|
* '''{{cd|this}} entity:''' The player to gain the advancement.
* '''{{cd|this}} entity:''' The player to gain the advancement.
Line 185: Line 212:
* '''Block entity:''' {{upcoming|java 26.3}} Any block entity data of the block at the location, if it was a block entity.
* '''Block entity:''' {{upcoming|java 26.3}} Any block entity data of the block at the location, if it was a block entity.
|-
|-
| {{cd|block_use}}||
| {{cdanchor|minecraft:block_use}}||
* Used internally when an advancement invokes a predicate on {{cd|default_block_use}} trigger.
* Used when an advancement invokes a predicate on {{cd|default_block_use}} trigger.
|
|
* '''{{cd|this}} entity:''' The player to gain the advancement.
* '''{{cd|this}} entity:''' The player to gain the advancement.
Line 193: Line 220:
|
|
|-
|-
| {{cd|container_process}}{{upcoming|java 26.3}} ||
| {{cdanchor|minecraft:container_process}}{{upcoming|java 26.3}} ||
* Used internally by [[Minecraft:smelting]] blocks and [[Minecraft:brewing stand]]s to evaluate [[Minecraft:Data component format#cooking_fuel|{{cd|cooking_fuel}}]] and [[Minecraft:Data component format#brewing_fuel|{{cd|brewing_fuel}}]] respectively.
* Used by [[Minecraft:smelting]] blocks and [[Minecraft:brewing stand]]s to evaluate [[Minecraft:Data component format#cooking_fuel|{{cd|cooking_fuel}}]] and [[Minecraft:Data component format#brewing_fuel|{{cd|brewing_fuel}}]] respectively.
|
|
* '''Origin:''' The center of the workstation block.
* '''Origin:''' The center of the workstation block.
Line 202: Line 229:
|
|
|-
|-
| {{cd|enchanted_damage}} || rowspan="5"|
| {{cdanchor|minecraft:enchanted_damage}} || rowspan="5"|
* Used by enchantments invoking predicates, see {{slink|Custom enchantment|Effect components}}
* Used by enchantments invoking predicates, see {{slink|Custom enchantment|Effect components}}
|
|
Line 213: Line 240:
* '''{{cd|direct_attacker}} entity:''' The projectile entity used in the attack.
* '''{{cd|direct_attacker}} entity:''' The projectile entity used in the attack.
|-
|-
| {{cd|enchanted_item}}
| {{cdanchor|minecraft:enchanted_item}}
|
|
* '''Tool:''' The item enchanted with the evaluated enchantment.
* '''Tool:''' The item enchanted with the evaluated enchantment.
Line 219: Line 246:
|
|
|-
|-
| {{cd|enchanted_location}}
| {{cdanchor|minecraft:enchanted_location}}
|
|
* '''{{cd|this}} entity:''' The attacked entity.
* '''{{cd|this}} entity:''' The attacked entity.
Line 227: Line 254:
|
|
|-
|-
| {{cd|enchanted_entity}}
| {{cdanchor|minecraft:enchanted_entity}}
|
|
* '''{{cd|this}} entity:''' The attacked entity.
* '''{{cd|this}} entity:''' The attacked entity.
Line 234: Line 261:
|
|
|-
|-
| {{cd|hit_block}}
| {{cdanchor|minecraft:hit_block}}
|
|
* '''{{cd|this}} entity:''' The entity that hit the block.
* '''{{cd|this}} entity:''' The entity that hit the block.
Line 242: Line 269:
|
|
|-
|-
| {{cd|villager_trade}}
| {{cdanchor|minecraft:villager_trade}}
| Used for evaluating [[Minecraft:villager trade definition|villager trades]].
| Used for evaluating [[Minecraft:villager trade definition|villager trades]].
|
|

Latest revision as of 11:15, 27 August 2026

Template:Exclusive

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
  • Used only by the hardcoded empty loot table. Supplies no loot context parameters.
  • Specifying Template:Cd means no context parameters can be used in this loot table.
None None
Template:Cdanchor
  • Origin: The center of the chest.
Template:Cdanchor
  • Origin: The position of the fishing bobber.
  • Tool: The fishing rod item that the player cast
Template:Cdanchor
  • Loot from a living entity's death.
  • The command Template:Cmd.
  • Template:Cd 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.
  • Template:Cd entity: The entity that was the source of the final damage to the victim entity.
  • Template:Cd entity: The entity that directly contacted the victim entity to kill them.
  • Template:Cd entity: The player that most recently damaged the victim entity.
Template:Cdanchor
  • Origin: The position of the entity being spawned.
  • Template:Cd entity: The entity being spawned.
Template:Cdanchor
  • Origin: The center of the suspicious block.
  • Template:Cd entity: The entity that used the brush on the suspicious block.
  • Tool: The tool used for brushing.
Template:Cdanchor
  • Origin: The center of the vault.
  • Template:Cd entity: The entity that opened the vault. Not present for item display inside vaults.
  • Tool: The item used as a key.
Template:Cdanchor
  • Gift from a cat, villager or sniffer.
  • Item laid by a chicken.
  • Origin: The cat, villager or sniffer's location.
  • Template:Cd entity: The cat, villager or sniffer that gave the gift. / The chicken that laid the item.
Template:Cdanchor 
Template:Cdanchor
  • Template:Cd entity: The player that gained the advancement.
  • Origin: The player's location when they gained the advancement.
Template:Cdanchor
  • Not used. Supplies all loot context parameters.
  • Specifying Template:Cd or omitting it means no checking for context parameters in this loot table when loading the data pack.
N/A N/A
Template:Cdanchor
  • Loot from mining a block.
  • Loot from a block being exploded.
  • The command Template:Cmd.
  • Block state: The block that was broken.
  • Origin: The center of the broken block.
  • Tool: The tool used to mine the block.
  • Template:Cd 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.
Template:Cdanchor
  • Origin: The position of the entity being sheared.
  • Template:Cd entity: The entity being sheared.
  • Tool: The tool used for the interaction.
Template:Cdanchor
  • Template:Cd: The entity being interacted with.
  • Tool: The tool used for the interaction.
Template:Cdanchor
  • Block state: The block that was interacted with.
  • Origin: The center of the block that was interacted with.Template:Upcoming
  • Block entity: Any block entity data of the block that was interacted with, if it is a block entity.
  • Template:Cd: The player or entity that interacted.
  • Tool: The tool used for the interaction.

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
  • Origin: The position where the command is run.
Template:CdanchorTemplate:Upcoming
  • Origin: The position where the command is run.
Template:CdanchorTemplate:Upcoming
Template:CdanchorTemplate:Upcoming
  • Origin: The position where the command is run.
  • Block state: The current state of the block at the position passed to Template:Command.
Template:CdanchorTemplate:Upcoming
  • Origin: The position where the command is run.
  • Container: The container or inventory being evaluated.
Template:Cdanchor
  • Origin: The position of the entity being checked.
  • Template:Cd entity: The entity being checked.
Template:Cdanchor
  • Used when an advancement invokes a predicate on an entity.
  • Template:Cd entity: The entity being checked.
  • Origin: The position of the player who triggers this advancement criterion.
Template:Cdanchor
  • Used when an advancement invokes a predicate on the location of a block where an item was used on.
  • Template:Cd entity: The player to gain the advancement.
  • Origin: The center of the block that was interacted with.
  • Tool: The item used to interact with the block.
  • Block state: The block that was interacted with.
  • Block entity: Template:Upcoming Any block entity data of the block at the location, if it was a block entity.
Template:Cdanchor
  • Used when an advancement invokes a predicate on Template:Cd trigger.
  • Template:Cd entity: The player to gain the advancement.
  • Origin: The center of the block that was interacted with.
  • Block state: The block that was interacted with.
Template:CdanchorTemplate:Upcoming
  • Origin: The center of the workstation block.
  • Block state: The state of the workstation block.
  • Block entity: The block entity data of the workstation block.
  • Container: The inventory of the workstation block.
Template:Cdanchor
  • Template:Cd entity: The attacked entity.
  • Enchantment level: The level of the enchantment currently evaluated
  • Origin: Position of the event Template:More info
  • Damage source: The damage source of the attack that caused the enchantment to trigger
Template:Cdanchor
  • Tool: The item enchanted with the evaluated enchantment.
  • Enchantment level: The level of the enchantment currently evaluated
Template:Cdanchor
  • Template:Cd entity: The attacked entity.
  • Enchantment level: The level of the enchantment currently evaluated
  • Origin: Position of the event Template:More info
  • Enchantment active status: Whether the enchantment was already active before the current evaluation
Template:Cdanchor
  • Template:Cd entity: The attacked entity.
  • Enchantment level: The level of the enchantment currently evaluated
  • Origin: Position of the event Template:More info
Template:Cdanchor
  • Template:Cd entity: The entity that hit the block.
  • Enchantment level: The level of the enchantment currently evaluated
  • Origin: Center of the block that was hit
  • Block state: The block that was hit
Template:Cdanchor Used for evaluating villager trades.
  • Origin: The position of the villager or wandering trader
  • Template:Cd entity: The villager or wandering trader.
  • Additional cost component allowed: Unit context. When present, causes the item modifier enchant_with_levels to generate the component Template:DCL on the item.

Navigation

Template:Navbox Java Edition technical

Minecraft:de:Beutekontext Minecraft:fr:Contexte de butin Minecraft:ja:ルート文脈 Minecraft:pt:Contexto de saque Minecraft:zh:战利品上下文