Advancement definition

Minecraft Wiki article. Categories: Java_Edition, Upcoming, Java_Edition_upcoming_tag, Java_Edition_upcoming, Data_packs

📌 Mirrored from Minecraft Wiki

This article is reproduced from Advancement definition on the Minecraft Wiki. Mirrored from revision 3724330. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.

On this page
This feature is exclusive to Java Edition.
 

Custom advancements in data packs of a Minecraft world store the advancement data for that world as separate JSON files.

File format

All advancement JSON files are structured according to the following format.

Legend

  • *: If parent field is written, this field is required.
  • [NBT Compound / JSON Object] The root tag.
    • [String] parent: The parent advancement directory of this advancement. If absent, this advancement is a root advancement. Circular references cause a loading failure.
    • [NBT Compound / JSON Object] display: Data related to the advancement's display.
      • [NBT Compound / JSON Object] icon*: Object containing data for the advancement's icon.
        • [String] id*: An item ID.
        • [Int] count: Optional. The amount of the item. Falls back to 1 if the field is absent.
        • [NBT Compound / JSON Object] components: Optional. Additional information about the item. See item components.
      • [String][NBT Compound / JSON Object][NBT List / JSON Array] title*: A JSON text component for the title of this advancement.
      • [String][NBT Compound / JSON Object][NBT List / JSON Array] description*: A JSON text component for the description text of this advancement.
      • [String] frame: Type of frame for the icon. challenge for fancy frame, goal for oval frame, task for plain frame. Defaults to task.
      • [String] background: The directory for the background to use in this advancement tab (used only for the root advancement).
      • [Boolean] show_toast: Whether to show a toast to the player when this advancement has been completed. Defaults to true.
      • [Boolean] announce_to_chat: Whether to announce in the chat when this advancement has been completed. Defaults to true.
      • [Boolean] hidden: Whether to hide this advancement and all its children from the advancement screen until this advancement has been completed. Has no effect on root advancements themselves, but still affects all their children. Defaults to false.
    • [NBT Compound / JSON Object] criteria*: The criteria to be tracked by this advancement.
      • [NBT Compound / JSON Object] <criterionName>: The key is a unique name given to the criterion. Can be any valid text.
    • [NBT List / JSON Array] requirements: Defines how these criteria above are completed to grant the advancement. Contains sublists, which in turn contain names of criteria from this advancement (all the <criterionName>s). When a criterion is newly completed or revoked, the advancement is granted if all sublists have at least one criterion within them completed. Optional, defaults to requiring all criteria completed.
      • [NBT List / JSON Array] Sublist within [NBT List / JSON Array] requirements, contains strings of <criterionName>s. If a sublist is empty, the advancement is unachievable without cheats.
        • [String] A criterion name.
    • [NBT Compound / JSON Object] rewards: An object representing the rewards provided when this advancement is obtained.
    • [Boolean] sends_telemetry_event: Determines whether telemetry data should be collected when this advancement is achieved or not. Defaults to false.

Display

Within the root tag of an advancement JSON object, the [NBT Compound / JSON Object] display object and the [String] parent string, both optional, are related to the display of the advancement.

If the [NBT Compound / JSON Object] display tag is present, it must have the [String][NBT Compound / JSON Object] title, [String][NBT Compound / JSON Object] description and [NBT Compound / JSON Object] icon fields present in order to be considered as valid advancement display data.

The [String] parent field, albeit not directly associated with the display data of an advancement, affects only the display data effectively. When an advancement does not have a display data and none of its children has a display data, the parent of the advancement affects only /advancement ... through|from|until usage.

Advancement tabs

Creating a root advancement (no [String] parent) with valid [NBT Compound / JSON Object] display data automatically creates a tab in the advancement menu. When loaded, the root advancement shows as a tab in the menu when any advancement in its advancement tree is granted to the player viewing the menu.

The missing texture displays on the tab's background if the root advancement does not have a background.

If a root advancement successfully creates a tab, child advancements of the root appear inside of that tab, provided they also have valid [NBT Compound / JSON Object] display data.

Positioning

The game automatically arranges advancements, positions them when it loads advancements from data packs, and sends the arrangement to the client. Each advancement has an arrow from its closest visible ancestor (i.e. if its parent does not have a display, it has a link from its grandparent, and so on). The root advancement appears on the leftmost column while each arrow points to an advancement in the next column. The arrangement of advancements within a column is chosen at random upon the player joining the world or server.

Lack of display

Some advancements, such as the vanilla recipe unlocking advancements, may lack a display so that they can utilize triggers and rewards instead of excessive commands or functions for more functionalities and a more flexible control. These advancements should not have the [NBT Compound / JSON Object] display field defined in order to hide from users and enjoy a better loading performance.

Criteria

  • *: If parent field is written, this field is required.

The format of a criterion:

  • [NBT Compound / JSON Object] <criterionName>: Root object. The key can be any valid text.
    • [String] trigger*: The trigger for this criterion.
    • [NBT Compound / JSON Object] conditions: Object containing conditions that need to be met when the trigger gets activated. The criterion is marked completed when the trigger activates and all conditions passed.
      • [NBT Compound / JSON Object] player: Checks properties of the player that would get the advancement. Not available for minecraft:impossible trigger.
      • [NBT List / JSON Array] player: Another format for "player". Specifies a list of predicates that must pass in order for the criterion to be granted. Not available for minecraft:impossible trigger.
        • [NBT Compound / JSON Object]: A single predicate.
      • Extra contents depend on selected [String] trigger.

List of triggers

All JSON fields in the conditions are optional unless marked with "*".

The possible values for [String] trigger and associated extra contents in [NBT Compound / JSON Object] conditions:

minecraft:allay_drop_item_on_block

Triggers when an allay drops an item on a block. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT List / JSON Array] location: Specifies a list of predicates that must pass in order for the criterion to be granted. The origin is the location of the block the item was dropped on, the block state belongs to that block, and the tool is the item dropped on the block. The this entity is the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:any_block_use

Triggers under the same conditions as both minecraft:default_block_use and minecraft:item_used_on_block. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT List / JSON Array] location: Specifies a list of predicates that must pass in order for the criterion to be granted. The origin is the location of the block that was interacted with, the block state belongs to that block, and the tool is either the item used on the block (for the item_used_on_block case) or simply the item in the player's main hand (for the default_block_use case). The this entity is the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:avoid_vibration

Triggers when a vibration event is ignored because the source player is crouching. No extra conditions.

minecraft:bee_nest_destroyed

Triggers when the player breaks a bee nest or beehive. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [String] block​[until: JE 26.2]blocks​[upcoming: JE 26.3]: Checks the block that was destroyed. Accepts block IDs.
    • [NBT Compound / JSON Object] item: The item used to break the block.
    • [Int] num_bees_inside: The number of bees that were inside the bee nest/beehive before it was broken.
    • [NBT Compound / JSON Object] num_bees_inside: Another form for [Int] num_bees_inside.
      • [Int] max: The maximum value.
      • [Int] min: The minimum value.

minecraft:bred_animals

Triggers after the player breeds 2 animals. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] child: Checks properties of the child that results from the breeding.
    • [NBT List / JSON Array] child: Another format for "child". Specifies a list of predicates that must pass in order for the criterion to be granted. The origin of the predicate is the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.
    • [NBT Compound / JSON Object] parent: The parent.
    • [NBT List / JSON Array] parent: Another format for "parent". Specifies a list of predicates that must pass in order for the criterion to be granted. The origin of the predicate is the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.
    • [NBT Compound / JSON Object] partner: The partner (The entity the parent was bred with).
    • [NBT List / JSON Array] partner: Another format for "partner". Specifies a list of predicates that must pass in order for the criterion to be granted. The origin of the predicate is the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:brewed_potion

Triggers after the player takes any item out of a brewing stand. Available extra conditions:

minecraft:changed_dimension

Triggers after the player travels between two dimensions. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [String] from: The dimension the entity traveled from. This tag is an identifier for a dimension (only these in vanilla; more can be added with data packs).
    • [String] to: The dimension the entity traveled to. Same accepted values as above.

minecraft:channeled_lightning

Triggers after the player successfully uses the Channeling enchantment on an entity or a lightning rod. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT List / JSON Array] victims: The victims hit by the lightning summoned by the Channeling enchantment. All entities in this list must be hit.
      • [NBT Compound / JSON Object]: A victim.
      • [NBT List / JSON Array]: Another format for the victim. Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the victim hit by the lighting, with the origin being the position of the player that would get the advancement.
        • [NBT Compound / JSON Object]: A single predicate.

minecraft:construct_beacon

Triggers after the player changes the structure of a beacon. (When the beacon updates itself). Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [Int] level: The level of the updated beacon structure.
    • [NBT Compound / JSON Object] level: Another format.
      • [Int] max: The maximum value.
      • [Int] min: The minimum value.

minecraft:consume_item

Triggers when the player consumes an item. Available extra conditions:

minecraft:crafter_recipe_crafted

Triggers when the player is ±8 blocks on any axis of a crafter when it crafts a recipe. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [String] recipe_id*: The recipe that was crafted.
    • [NBT List / JSON Array] ingredients: An array of item predicates for the recipe ingredients. Each item can match only one predicate, and every predicate needs to pass for the criterion to be granted.

minecraft:cured_zombie_villager

Triggers when the player cures a zombie villager. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] villager: The villager that is the result of the conversion. The 'type' tag is redundant since it is always "villager".
    • [NBT List / JSON Array] villager: Another format for "villager". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the villager, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.
    • [NBT Compound / JSON Object] zombie: The zombie villager right before the conversion is complete (not when it is initiated). The 'type' tag is redundant since it is always "zombie_villager".
    • [NBT List / JSON Array] zombie: Another format for "zombie". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the zombie villager, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:default_block_use

Triggers when the player activates a block's default use action (opening a door, pushing a button, opening a crafting grid, etc). Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT List / JSON Array] location: Specifies a list of predicates that must pass in order for the criterion to be granted. The origin is the location of the block that was interacted with and the block state belongs to that block. Note that for this trigger, a "tool" is not provided. The this entity is the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:effects_changed

Triggers after the player gets a status effect applied or taken from them. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] effects: A list of active status effects the player currently has.
      • [NBT Compound / JSON Object] <minecraft:effect_name>: The key name is a status effect name.
        • [Boolean] ambient: Whether the effect is from a beacon.
        • [Int] amplifier: The effect amplifier.
        • [NBT Compound / JSON Object] amplifier: Another format.
          • [Int] max: The maximum value.
          • [Int] min: The minimum value.
        • [Int] duration: The effect duration in ticks.
        • [NBT Compound / JSON Object] duration: Another format.
          • [Int] max: The maximum value.
          • [Int] min: The minimum value.
        • [Boolean] visible: Whether the effect has visible particles.
    • [NBT Compound / JSON Object] source: The entity that was the source of the status effect. When there is no entity or when the effect was self-applied or removed, the test passes only if the source is not specified.
    • [NBT List / JSON Array] source: Another format for "source". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the source, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:enchanted_item

Triggers after the player enchants an item through an enchanting table (does not get triggered through an anvil, or through commands). Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] item: The item after it has been enchanted.
    • [Int] levels: The levels spent by the player on the enchantment.
    • [NBT Compound / JSON Object] levels: Another format.
      • [Int] max: The maximum value.
      • [Int] min: The minimum value.

minecraft:enter_block

Triggers once for each block the player's hitbox is inside (up to 12 blocks, the maximum number of blocks the player can stand in), twice per tick plus once more for every time the player moves or looks around during the same tick. This results in the trigger activating tens of times per tick, and in extreme cases, even hundreds of times per tick. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [String] block: The block that the player is standing in. Accepts block IDs.
    • [NBT Compound / JSON Object] state: A map of block property names to values. Errors if the block doesn't have these properties.
      • [String] key: Block property key and value pair.
      • [NBT Compound / JSON Object] key: Another format.
        • [String] max: A maximum value.
        • [String] min: A minimum value.

minecraft:entity_hurt_player

Triggers after a player gets hurt (even when it's not caused by an entity)[1]. Available extra conditions:

minecraft:entity_killed_player

Triggers after a living entity kills a player. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] entity: Checks the entity that was the source of the damage that killed the player (for example: The skeleton that shot the arrow).
    • [NBT List / JSON Array] entity: Another format for "entity". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the entity that kills the player, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.
    • [NBT Compound / JSON Object] killing_blow: Checks the type of damage that killed the player.

minecraft:fall_after_explosion

Triggers when a player lands after being launched upward by an explosion or wind burst. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] start_position: A location predicate for the last position before the falling started.
    • [NBT Compound / JSON Object] distance: The distance between the start position and the player's position.
    • [NBT Compound / JSON Object] source: Checks the entity that was the source of the explosion or wind burst that launched the player upward.
    • [NBT List / JSON Array] source: Another format for "source". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the entity that kills the player, with the origin being the position of the player that would get the advancement.

minecraft:fall_from_height

Triggers when a player lands after falling. Available extra conditions:

minecraft:filled_bucket

Triggers after the player fills a bucket. Available extra conditions:

minecraft:fishing_rod_hooked

Triggers after the player successfully catches an item with a fishing rod or pulls an entity with a fishing rod. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:

minecraft:hero_of_the_village

Triggers when a raid ends in victory and the player has attacked at least one raider from that raid. No extra conditions.

minecraft:impossible

Never triggers. No available conditions.

Criteria with this trigger can only be granted from commands.

minecraft:inventory_changed

Triggers after any changes happen to a slot in the player's inventory, except for the player.cursor and player.crafting.* slots. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT List / JSON Array] items: A list of items to be checked against the item(s) that were added to the player's inventory when the advancement was triggered. For the trigger to pass, each item predicate in this list must match at least one item that was added.
    • [NBT Compound / JSON Object] slots:
      • [Int] empty: The amount of slots empty in the inventory.
      • [NBT Compound / JSON Object] empty: Another format.
        • [Int] max: The maximum value.
        • [Int] min: The minimum value.
      • [Int] full: The amount of slots completely filled (stacksize) in the inventory.
      • [NBT Compound / JSON Object] full: Another format.
        • [Int] max: The maximum value.
        • [Int] min: The minimum value.
      • [Int] occupied: The amount of slots occupied in the inventory.
      • [NBT Compound / JSON Object] occupied: Another format.
        • [Int] max: The maximum value.
        • [Int] min: The minimum value.

minecraft:item_durability_changed

Triggers after any item in the inventory has been damaged in any form. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [Int] delta: The change in durability (negative numbers are used to indicate a decrease in durability).
    • [NBT Compound / JSON Object] delta: Another format.
      • [Int] max: The maximum value.
      • [Int] min: The minimum value.
    • [Int] durability: The remaining durability of the item.
    • [NBT Compound / JSON Object] durability: Another format.
      • [Int] max: The maximum value.
      • [Int] min: The minimum value.
    • [NBT Compound / JSON Object] item: The item before it was damaged, allows you to check the durability before the item was damaged.

minecraft:item_used_on_block

Triggers when the player uses their hand or an item on a block. Note that the item (or lack thereof) must be able to interact with the block, e.g. an item cannot be "used" on a campfire if there isn't a recipe that allows the item to be cooked on a campfire (however, placing a block by using on the campfire does count as an interaction). See also minecraft:default_block_use for detecting non-item-specific uses.

Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT List / JSON Array] location: Specifies a list of predicates that must pass in order for the criterion to be granted. The origin is the location of the block the item was used on, the block state belongs to that block, and the tool is the item used on the block. The this entity is the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:kill_mob_near_sculk_catalyst

Triggers after a player is the source of a mob or player being killed within the range of a sculk catalyst. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] entity: The entity that was killed.
    • [NBT List / JSON Array] entity: Another format for "entity". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the mob, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.
    • [NBT Compound / JSON Object] killing_blow: The type of damage that killed an entity.

minecraft:killed_by_arrow

Triggers after the player kills a mob or player using an arrow in ranged combat. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] fired_from_weapon: The weapon that fired the arrow.
    • [Int] unique_entity_types: The exact count of types of entities killed.
    • [NBT Compound / JSON Object] unique_entity_types: Another format. The acceptable range of count of types of entities killed.
      • [Int] max: The maximum value.
      • [Int] min: The minimum value.
    • [NBT List / JSON Array] victims: A list of victims. All of the entries must be matched, and one killed entity may match only one entry.
      • [NBT Compound / JSON Object]: A killed entities.
      • [NBT List / JSON Array]: Another format for the victim. Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the victim, with the origin being the position of the player that would get the advancement.
        • [NBT Compound / JSON Object]: A single predicate.

minecraft:levitation

Triggers when the player has the levitation status effect. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] distance: The distance between the position where the player started levitating and the player's current position.
    • [Int] duration: The duration of the levitation in ticks.
    • [NBT Compound / JSON Object] duration: Another format.
      • [Int] max: The maximum value.
      • [Int] min: The minimum value.

minecraft:lightning_strike

Triggers when a lightning bolt disappears from the world, only for players within a 256 block radius of the lightning bolt. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] lightning: The lightning bolt that disappeared.
    • [NBT List / JSON Array] lightning: Another format for "lightning". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the lightning, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.
    • [NBT Compound / JSON Object] bystander: An entity not hurt by the lightning strike but in a certain area around it.
    • [NBT List / JSON Array] bystander: Another format for "bystander". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the bystander, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:location

Triggers every 20 ticks (1 second). No extra conditions.

minecraft:nether_travel

Triggers when the player travels to the Nether and then returns to the Overworld. Available extra conditions:

minecraft:placed_block

Triggers when the player places a block. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT List / JSON Array] location: Specifies a list of predicates that must pass in order for the criterion to be granted. The origin is the location of the block placed, the block state belongs to that block, and the tool is the item used to place the block. The this entity is the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:player_generates_container_loot

Triggers when the player generates the contents of a container (container block, minecart with chest, minecart with hopper, boat with chest and suspicious block) with a loot table set. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [String] loot_table*: The identifier of the generated loot table.

minecraft:player_hurt_entity

Triggers after the player hurts a mob or player. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] damage: The damage that was dealt.
    • [NBT Compound / JSON Object] entity: The entity that was damaged.
    • [NBT List / JSON Array] entity: Another format for "entity". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the entity, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:player_interacted_with_entity

Triggers when the player interacts with an entity. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] item: The item that was in the player's hand during interaction.
    • [NBT Compound / JSON Object] entity: The entity that was interacted with.
    • [NBT List / JSON Array] entity: Another format for "entity". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the entity, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:player_killed_entity

Triggers after a player is the source of a mob or player being killed. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] entity: The entity that was killed.
    • [NBT List / JSON Array] entity: Another format for "entity". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the entity, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.
    • [NBT Compound / JSON Object] killing_blow: The type of damage that killed an entity.

minecraft:player_sheared_equipment

Triggers after a player shears equipment off of a mob, such as wolf armor. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] entity: The entity whose equipment was sheared.
    • [NBT List / JSON Array] entity: Another format for "entity". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the entity, with the origin being the position of the player that would get the advancement.
    • [NBT Compound / JSON Object] item: The item of equipment that was sheared off.

minecraft:recipe_crafted

Triggers when the player crafts a recipe in a crafting table, stonecutter or smithing table. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [String] recipe_id*: The recipe that was crafted.
    • [NBT List / JSON Array] ingredients: An array of item predicates for the recipe ingredients. Each item can match only one predicate, and every predicate needs to pass for the criterion to be granted.

minecraft:recipe_unlocked

Triggers after the player unlocks a recipe (using a knowledge book for example). Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [String] recipe*: The recipe that was unlocked.

minecraft:ride_entity_in_lava

Triggers when a player mounts an entity walking on lava and while the entity moves with them. Available extra conditions:

minecraft:shot_crossbow

Triggers when the player shoots a crossbow. Available extra conditions:

minecraft:slept_in_bed

Triggers when the player enters a bed. No extra conditions.

minecraft:slide_down_block

Triggers when the player slides down a block. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [String] block: The block that the player slid on.
    • [NBT Compound / JSON Object] state: A map of block property names to values. Errors if the block doesn't have these properties.
      • [String] key: Block property key and value pair.
      • [NBT Compound / JSON Object] key: Another format.
        • [String] max: A maximum value.
        • [String] min: A minimum value.

minecraft:spear_mobs

Triggers when the player charges with a spear and hits a set amount of entities. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [String] player: The player that triggers the advancement. It is optional and can be omitted.
    • [Int] count: The count of entities killed by the spear.

minecraft:started_riding

Triggers when the player starts riding a vehicle or an entity starts riding a vehicle currently ridden by the player. No extra conditions.

minecraft:summoned_entity

Triggers after an entity has been summoned. Works with iron golems (iron blocks and pumpkin), snow golems (snow blocks and pumpkin), copper golems (copper block and pumpkin), the ender dragon (end crystals) and the wither (soul sand/soul soil and wither skulls). Using dispensers, commands, or pistons to place the wither skulls or pumpkins still activate this trigger. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] entity: The summoned entity.
    • [NBT List / JSON Array] entity: Another format for "entity". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the entity, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:tame_animal

Triggers after the player tames an animal. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] entity: Checks the entity that was tamed.
    • [NBT List / JSON Array] entity: Another format for "entity". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the entity, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:target_hit

Triggers when the player shoots a target block. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [Int] signal_strength: The redstone signal that the target block emits.
    • [NBT Compound / JSON Object] signal_strength: Another format.
      • [Int] max: The maximum value.
      • [Int] min: The minimum value.
    • [NBT Compound / JSON Object] projectile: The projectile hit the target block.
    • [NBT List / JSON Array] projectile: Another format for "projectile". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the projectile, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:thrown_item_picked_up_by_entity

Triggers after the player throws an item and another entity picks it up. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] item: The thrown item that was picked up.
    • [NBT Compound / JSON Object] entity: The entity that picked up the item.
    • [NBT List / JSON Array] entity: Another format for "entity". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the entity, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:thrown_item_picked_up_by_player

Triggers when a player picks up an item thrown by another entity. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] item: The item thrown.
    • [NBT Compound / JSON Object] entity: The entity that threw the item.
    • [NBT List / JSON Array] entity: Another format for "entity". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the entity, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:tick

Triggers every tick (20 times a second). No extra conditions.

minecraft:used_ender_eye

Triggers when the player uses an eye of ender (in a world where strongholds generate). Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [Double] distance: The horizontal distance between the player and the stronghold.
    • [NBT Compound / JSON Object] distance: Another format.
      • [Double] max: A maximum value.
      • [Double] min: A minimum value.

minecraft:used_totem

Triggers when the player uses a totem. Available extra conditions:

minecraft:using_item

Triggers for every tick that the player uses an item that is used continuously. It is known to trigger for bows, crossbows, honey bottles, milk buckets, potions, shields, spyglasses, tridents, food items, eyes of ender, etc. Most items that activate from a single click, such as fishing rods, do not affect this trigger. Available extra conditions:

minecraft:villager_trade

Triggers after the player trades with a villager or a wandering trader. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] item: The item that was purchased. The "count" tag checks the count from one trade, not multiple.
    • [NBT Compound / JSON Object] villager: The villager the item was purchased from.
    • [NBT List / JSON Array] villager: Another format for "villager". Specifies a list of predicates that must pass in order for the criterion to be granted. The checks are applied to the villager, with the origin being the position of the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.

minecraft:voluntary_exile

Triggers when the player causes a raid. No extra conditions.

Removed triggers

minecraft:arbitrary_player_tick

Triggers every tick for one player only. No available conditions.

Only exists in 17w18b.

minecraft:item_delivered_to_player

Triggers when an allay delivers an item to the player. No extra conditions.

Only exists in 22w14a.

minecraft:player_damaged

Triggers when the player receives damage. Available conditions:

Removed in 17w14a.

minecraft:safely_harvest_honey

Triggers when the player harvests honey from a bee nest/beehive with a campfire below it. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] block: The block that the player harvested the honey from.
      • [String] block: A block ID.
      • [String] tag: A block tag.
    • [NBT Compound / JSON Object] item: The item that the player used to harvest the honey.

This trigger was made redundant by the item_used_on_block trigger. Removed in 20w20a.

Temporary triggers

minecraft:voted

Triggers when the player casts a vote. No extra conditions.

minecraft:bring_home_corruption

Triggers when the player uses corrupted potato peels on the top side of terre de pomme placed in the Overworld. No extra conditions.

minecraft:compost_staff

Triggers when the player uses a Potatiesh, Greatstaff of the Peasant on a composter. No extra conditions.

minecraft:eat_armor

Triggers when the player eats a part of an equipped poisonous potato chestplate. No extra conditions.

minecraft:get_peeled

Triggers when the player is peeled by another player while wearing a poisonous potato chestplate. No extra conditions.

minecraft:peel_block

Triggers when the player uses a potato peeler on a block that can be peeled. No extra conditions.

minecraft:peel_potato_armor

Triggers when the player uses a potato peeler on an entity wearing a poisonous potato chestplate. No extra conditions.

minecraft:peel_potato_sheep

Triggers when the player uses a potato peeler on a sheep in the Potato dimension. No extra conditions.

minecraft:potato_refined

Triggers when the player takes an item out of the output slot of a potato refinery. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT Compound / JSON Object] result_predicate*: The result of the refining recipe.
      • [String] type*: The type of refining recipe. Must be either standard for a recipe that outputs a different item than the input, or lubrication for a recipe that increments the lubrication factor of an item.
      • [NBT Compound / JSON Object] item_predicate*: The output item.
      • [Int] min_lubrication: The minimum lubrication factor the output item must have. Must exist if [String] type is lubrication and has no effect otherwise.
minecraft:rumble_plant

Triggers when the player equips a poisonous potato plant on their head. No extra conditions.

minecraft:said_potato

Triggers when the player sends a chat message containing "potato" (case-sensitive). No extra conditions.

minecraft:throw_lubricated

Triggers when the player throws a lubricated item. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [Int] min_lubrication*: The minimum lubrication factor the thrown item must have. This condition does not support a min-max range.
minecraft:consume_poisonous_potatoes

Triggers when the player consumes a poisonous potato that causes their minecraft.used:minecraft.poisonous_potato statistic to increase to 100. Available extra conditions:

minecraft:inventory_cashed_in

Triggers when the player cashes in an item by returning to the hub from a successful mine. Available extra conditions:

  • [NBT Compound / JSON Object] conditions:
    • [NBT List / JSON Array] location: Specifies a list of predicates that must pass in order for the criterion to be granted. The origin is the location of the mine crafter, the block state belongs to that block, and the tool is the item that was cashed in. The this entity is the player that would get the advancement.
      • [NBT Compound / JSON Object]: A single predicate.
minecraft:level_completed

Triggers when the player returns to the hub after successfully exiting a mine. No extra conditions.

minecraft:level_failed

Triggers when the player returns to the hub after failing a mine. No extra conditions.

minecraft:mine_crafter_upgraded

Triggers when the player upgrades a mine crafter using experience. No extra conditions.

minecraft:mine_revisitor_activated

Triggers when the player places a mine on a mine revisitor. No extra conditions.

minecraft:player_unlock_bought

Triggers when the player buys an unlock. No extra conditions.

minecraft:player_unlock_unlocked

Triggers when the player gets the ability to buy a new unlock by buying its parent unlock. No extra conditions.

minecraft:special_mine_completed

Triggers when the player returns to the hub after successfully exiting a special mine. No extra conditions.

minecraft:barrel_roll

Triggers when a living barrel commanded by the player moves. No extra conditions.

minecraft:built_house

Triggers when 23 living blocks and a living door combine into a house, if the player commanded any of them. No extra conditions.

minecraft:built_trap

Triggers when 8 living iron bars or copper bars combine into a trap, if the player commanded any of them. No extra conditions.

minecraft:end_portal_crafted

Triggers when 12 living end portal frames with eyes of ender in them combine into an end portal, if the player commanded any of them. No extra conditions.

minecraft:eye_frame_combination

Triggers when a living eye of ender combines with a living end portal frame, if the player commanded either of them. No extra conditions.

minecraft:nether_portal_crafted

Triggers when 12 living obsidian and a living flint and steel combine into a nether portal, if the player commanded any of them. No extra conditions.

minecraft:use_item

Triggers when the player uses an item that can be instantly used from their hotbar. Available extra conditions:

History

Java Edition
1.1217w13aAdded advancements, replacing achievements.
Advancements can be progressed with advancement definitions.
17w16bAdded item_durability_changed trigger.
17w17aAdded the command reward.
Added the [String] item, [Int] count and [NBT Compound / JSON Object] nbt parameters have been added to [NBT Compound / JSON Object] icon.
17w17bAll default advancements now pull titles and descriptions from the localization files.
Added change_dimension trigger
17w18aRe-introduced announcements to chat when someone earns an advancement.
Added breed_animal, tame_animal and tick triggers.
Added /reload, which can reload advancements.
Added /gamerule announceAdvancements, which toggles announcing of advancements, replacing the old server.properties entry.
17w18bAdded consume_item, placed_block and arbitrary_player_tick triggers.
pre1Replaced the command reward with the function reward.
Added the hidden parameter.
Added effects_changed, used_totem and nether_travel triggers.
Removed arbitrary_player_tick trigger.
1.1317w43aAdded data packs which can be used to create custom advancements.
18w14aAdded channeled_lightning, filled_bucket and fishing_rod_hooked triggers.
1.1519w46aAdded bee_nest_destroyed, safely_harvest_honey and slide_down_block triggers.
1.1620w10aChanged target_hit trigger: renamed signalStrength to signal_strength, added projectile and shooter.
20w18aCriteria can now use loot table conditions.
Added player condition to all triggers, except impossible.
20w20aRemoved safely_harvest_honey trigger.
Added item_used_on_block, player_generates_container_loot and thrown_item_picked_up_by_entity triggers.
pre6Added player_interacted_with_entity trigger.
1.1821w39aAdded fall_from_height and ride_entity_in_lava triggers.
1.1922w14aRemoved location condition from location, slept_in_bed, hero_of_the_village and voluntary_exile triggers. Is now handled with player.location condition.
1.1922w15aRemoved thrown_item_picked_up_by_player and item_delivered_to_player triggers.
Added avoid_vibration trigger.
1.19.423w07aAdded player_interacted_with_entity and player_hurt_entity triggers.
1.2023w16aAdded recipe_crafted trigger.
1.20.524w03aAdded any_block_use and default_block_use triggers.
24w09aRenamed the [String] item parameter to [String] id.
Renamed the [NBT Compound / JSON Object] nbt parameter to [NBT Compound / JSON Object] components.
24w12aAdded crafter_recipe_crafted and fall_after_explosion triggers.
1.2124w21aRenamed File directory.png: Sprite image for directory in Minecraft advancements to File directory.png: Sprite image for directory in Minecraft advancement in the data pack folder directory.
1.21.224w37aRenamed killed_by_crossbow trigger to killed_by_arrow.
1.21.525w04aRemoved textures/ prefix and .png suffix from background parameter.
1.21.6pre3Added player_sheared_equipment trigger.
1.21.1125w45aAdded spear_mobs trigger.
Upcoming Java Edition
26.3snap4The loot sub-field in the rewards field now accepts an inline value, a single namespaced ID, a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:loot_table type.
Multiple trigger fields that accepted a list of loot conditions (AKA predicates) are now stricter.
Changed several triggers: minecraft:any_block_use, minecraft:bee_nest_destroyed, minecraft:bred_animals, minecraft:brewed_potion, minecraft:channeled_lightning, minecraft:cured_zombie_villager, minecraft:default_block_use, minecraft:effects_changed, minecraft:enter_block, minecraft:fall_after_explosion, minecraft:fishing_rod_hooked, minecraft:placed_block, minecraft:item_used_on_block, minecraft:allay_drop_item_on_block, minecraft:player_killed_entity, minecraft:entity_killed_player, minecraft:kill_mob_near_sculk_catalyst, minecraft:lightning_strike, minecraft:player_generates_container_loot, minecraft:thrown_item_picked_up_by_player, minecraft:thrown_item_picked_up_by_entity, minecraft:player_hurt_entity, minecraft:entity_hurt_player, minecraft:player_interacted_with_entity, minecraft:player_sheared_equipment, minecraft:crafter_recipe_crafted, minecraft:recipe_crafted, minecraft:recipe_unlocked, minecraft:slide_down_block, minecraft:summoned_entity, minecraft:tame_animal, minecraft:target_hit, minecraft:villager_trade.

References

  1. ↑ MC-116922

Sources