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:
- The root tag.
- display: The optional display data.
- icon: The data for the icon.
- item: The item id.
- nbt: The nbt data of the item.
- title: The title for this advancement.
- title: A JSON text component (containing text and formatting like used in /tellraw and various other commands. Also translate tag can be used here).
- frame: The optional type of frame for the icon.
challenge
for a tile with a more fancy spiked border as it is used for the kill all mobs advancement,goal
for a tile with a rounded border as it is used for the full beacon advancement,task
for a normal tile (default.) - background: The optional directory for the background to use in this advancement tab (used only for the root advancement).
- description: The description of the advancement.
- description: A JSON text component (containing text and formatting like used in
/tellraw
and various other commands. Also translate tag can be used here). - show_toast: Can be
true
orfalse
. Whether or not to show the toast pop up after completing this advancement. Defaults to true. - announce_to_chat: Can be
true
orfalse
. Whether or not to announce in the chat when this advancement has been completed. Defaults to true. - hidden: Can be
true
orfalse
. Whether or not to hide this advancement and all its children from the advancement screen until this advancement have been completed. Has no effect on root advancements themselves, but still affects all their children. Defaults to false.
- icon: The data for the icon.
- parent: The optional parent advancement directory of this advancement. If this field is absent, this advancement is a root advancement. Circular references cause a loading failure.
- criteria: The required criteria that have to be met.
- <criterionName>: A name given to the criterion (can be any string, must be unique).
- trigger: The trigger for this advancement; specifies what the game should check for the advancement.
- conditions: All the conditions that need to be met when the trigger gets activated.
- <criterionName>: A name given to the criterion (can be any string, must be unique).
- requirements: An optional list of requirements (all the <criteriaNames>). If all criteria are required, this may be omitted. With multiple criteria: requirements contains a list of lists with criteria (all criteria need to be mentioned). If all of the lists each have any criteria met, the advancement is complete. (basically AND grouping of OR groups)
- rewards: An optional object representing the rewards provided when this advancement is obtained.
- recipes: A list of recipes to unlock.
- A namespaced ID for a recipe.
- loot: A list of loot tables to give to the player.
- A namespaced ID for a loot table.
- experience: An amount of experience.
- function: A function to run. Function tags are not allowed.
- recipes: A list of recipes to unlock.
- display: The optional display data.
Display
Within the root tag of an advancement JSON object, the display field and the parent field, both optional, are related to the display of the advancement.
If the display tag is present, it must have both the title and description fields present in order to be a valid advancement display data.
The 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 has no effect to the advancement itself.
Tab creation
To create a tab in the advancement menu, define a root advancement (an advancement without a parent) with a display. When the data pack containing the advancement is loaded, the root advancement shows a tab in the advancement menu when any advancement in its advancement tree is granted to the player viewing the menu.
When a background is not specified for a root advancement, the tab is still created, but with the tab background appearing as the missing texture.
Presence
For a non-root advancement (i.e. an advancement with a parent defined), these conditions must be met in order to have it displayed in a tab when unlocked:
- Its root advancement must be a valid tab.
- It must have a display.
Position
The game automatically arranges advancements, position 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 based on file name.
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 display field defined in order to hide from users and enjoy a better loading performance.
List of triggers
minecraft:bred_animals
Triggers after the player breeds 2 animals. Available conditions:
- conditions:
- child: The child that results from the breeding.
- All possible conditions for entities
- parent: The parent.
- All possible conditions for entities
- partner: The partner (the entity the parent was bred with, useful for checking horses + donkey = mule breeding)
- All possible conditions for entities
- child: The child that results from the breeding.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:bred_animals",
"conditions": {
"child": {
"type": "mule"
},
"parent": {
"location": {
"biome": "minecraft:beaches"
}
},
"partner": {
"effects": {
"minecraft:speed": {
"amplifier": {
"min": 2
}
}
}
}
}
}
}
}
minecraft:brewed_potion
Triggers after the player takes any item out of a brewing stand. Available conditions:
- conditions:
- potion: A brewed potion ID.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:brewed_potion",
"conditions": {
"potion": "minecraft:strong_swiftness"
}
}
}
}
minecraft:changed_dimension
Triggers after the player travels between two dimensions. Available conditions:
- conditions:
- from: The dimension the entity traveled from. Accepts these 3 values.
- to: The dimension the entity traveled to. Same accepted values as above.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:changed_dimension",
"conditions": {
"from": "minecraft:the_end",
"to": "minecraft:overworld"
}
}
}
}
minecraft:channeled_lightning
Triggers after the player successfully uses the Channeling enchantment on an entity. Available conditions:
- conditions:
- victims: The victims hit by the lightning summoned by the Channeling enchantment. All entities in this list must be hit.
- :
- All possible conditions for entities
- :
- victims: The victims hit by the lightning summoned by the Channeling enchantment. All entities in this list must be hit.
An example
{
"criteria":{
"example":{
"trigger": "minecraft:channeled_lightning",
"conditions":{
"victims":[
{
"type": "minecraft:skeleton_horse",
"nbt": "{SkeletonTrap: true}"
}
]
}
}
}
}
minecraft:construct_beacon
Triggers after the player changes the structure of a beacon. (When the beacon updates itself). Available conditions:
- conditions:
- level: The tier of the updated beacon structure.
- level:
- max: The maximum value.
- min: The minimum value.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:construct_beacon",
"conditions": {
"level": {
"min": 3
}
}
}
}
}
minecraft:consume_item
Triggers when the player consumes an item. Available conditions:
- conditions:
- item: The item that was consumed
- All possible conditions for items
- item: The item that was consumed
An example
{
"criteria": {
"example": {
"trigger": "minecraft:consume_item",
"conditions": {
"item": {
"item": "minecraft:enchanted_golden_apple",
"nbt": "{display:{Name:\"Example\"}}"
}
}
}
}
}
minecraft:cured_zombie_villager
Triggers when the player cures a zombie villager. Available conditions:
- conditions:
- villager: The villager that is the result of the conversion. The 'type' tag is redundant since it will always be "villager".
- All possible conditions for entities
- zombie: The zombie villager right before the conversion is complete (not when it is initiated). The 'type' tag is redundant since it will always be "zombie_villager".
- All possible conditions for entities
- villager: The villager that is the result of the conversion. The 'type' tag is redundant since it will always be "villager".
An example
{
"criteria": {
"example": {
"trigger": "minecraft:cured_zombie_villager",
"conditions": {
"villager": {
"location": {
"biome": "minecraft:plains"
}
},
"zombie": {
"distance": {
"horizontal": {
"max": 10
}
}
}
}
}
}
}
minecraft:effects_changed
Triggers after the player gets a status effect applied or taken from them. Available conditions:
- conditions:
- effects: A list of status effects the player has.
- <minecraft:effect_name>: A status effect with the key name being the status effect name.
- amplifier: The effect amplifier.
- amplifier:
- max: The maximum value.
- min: The minimum value.
- duration: The effect duration in ticks.
- duration:
- max: The maximum value.
- min: The minimum value.
- <minecraft:effect_name>: A status effect with the key name being the status effect name.
- effects: A list of status effects the player has.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:effects_changed",
"conditions": {
"effects": {
"minecraft:weakness": {},
"minecraft:slowness": {
"amplifier": 2,
"duration": {
"min": 100,
"max": 500
}
}
}
}
}
}
}
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 conditions:
- conditions:
- item: The item after it has been enchanted.
- All possible conditions for items
- levels: The levels spent by the player on the enchantment.
- levels:
- max: The maximum value.
- min: The minimum value.
- item: The item after it has been enchanted.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:enchanted_item",
"conditions": {
"item": {
"item": "minecraft:wooden_sword",
"enchantments": [
{
"enchantment": "minecraft:sharpness",
"levels": {
"min": 2
}
}
]
},
"levels": {
"min": 3
}
}
}
}
}
minecraft:enter_block
Triggers when the player stands in a block. Checks every tick and will try to trigger for each successful match (up to 8 times, the maximum amount of blocks a player can stand in), which only works if the advancement is revoked from within the advancement using a function reward. Available conditions:
- conditions:
- block: The block that the player is standing in. Accepts block IDs.
- state: The block states of the block.
- <state_name>: A single block state, with the key name being the state name and the value being the required value of that state.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:enter_block",
"conditions": {
"block": "minecraft:rose_bush",
"state": {
"half": "lower"
}
}
}
}
}
minecraft:entity_hurt_player
Triggers after a player gets hurt. Available conditions:
- conditions:
- damage: Checks the damage done to the player.
- Damage tags
- damage: Checks the damage done to the player.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:entity_hurt_player",
"conditions": {
"damage": {
"source_entity": {
"type": "skeleton",
"direct_entity": {
"type": "arrow"
}
},
"taken": {
"min": 4.0
}
}
}
}
}
}
minecraft:entity_killed_player
Triggers after an entity kills a player. Available conditions:
- conditions:
- entity: Checks the entity that was the source of the damage that killed the player (for example: The skeleton that shot the arrow).
- All possible conditions for entities
- killing_blow: Checks the type of damage that killed the player.
- Tags common to all damage types
- entity: Checks the entity that was the source of the damage that killed the player (for example: The skeleton that shot the arrow).
An example
{
"criteria": {
"example": {
"trigger": "minecraft:entity_killed_player",
"conditions": {
"entity": {
"type": "skeleton"
},
"killing_blow": {
"is_projectile": true
}
}
}
}
}
minecraft:filled_bucket
Triggers after the player fills a bucket. Available conditions:
- conditions:
- item: The item resulting from filling the bucket.
- All possible conditions for items
- item: The item resulting from filling the bucket.
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 conditions:
- conditions:
- entity: The entity that was pulled.
- All possible conditions for entities
- item: The item that was caught.
- All possible conditions for items
- rod: The fishing rod used.
- All possible conditions for items
- entity: The entity that was pulled.
minecraft:hero_of_the_village
Triggers when the player defeats a raid and checks where the player is. Available conditions:
- conditions:
- Tags common to all locations
An example
{
"criteria": {
"example": {
"trigger": "minecraft:hero_of_the_village",
"conditions": {
"biome": "minecraft:plains",
"dimension": "minecraft:overworld",
"position": {
"x": 0,
"y": 60,
"z": {
"min": -10,
"max": 10
}
}
}
}
}
}
minecraft:impossible
Triggers only using commands.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:impossible"
}
}
}
minecraft:inventory_changed
Triggers after any changes happen to the player's inventory. Available conditions:
- conditions:
- items: A list of items in the player's inventory. All items in the list must be in the player's inventory, but not all items in the player's inventory have to be in this list.
- :
- All possible conditions for items
- :
- slots:
- empty: The amount of slots empty in the inventory.
- empty:
- max: The maximum value.
- min: The minimum value.
- full: The amount of slots completely filled (stacksize) in the inventory.
- full:
- max: The maximum value.
- min: The minimum value.
- occupied: The amount of slots occupied in the inventory.
- occupied:
- max: The maximum value.
- min: The minimum value.
- items: A list of items in the player's inventory. All items in the list must be in the player's inventory, but not all items in the player's inventory have to be in this list.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:polished_granite",
"count": {
"min": 5,
"max": 10
}
},
{
"item": "minecraft:lime_wool"
},
{
"item": "minecraft:wooden_sword",
"durability": {
"min": 50
},
"nbt": "{display:{Name:\"Example\"}}"
}
],
"slots": {
"occupied": 3
}
}
}
}
}
minecraft:item_durability_changed
Triggers after any item in the inventory has been damaged in any form. Available conditions:
- conditions:
- delta: The difference in durability.
- delta:
- max: The maximum value.
- min: The minimum value.
- durability: The remaining durability of the item.
- durability:
- max: The maximum value.
- min: The minimum value.
- item: The item before it was damaged, allows you to check the durability before the item was damaged.
- All possible conditions for items
An example
{
"criteria": {
"example": {
"trigger": "minecraft:item_durability_changed",
"conditions": {
"delta": -2,
"item": {
"item": "minecraft:wooden_axe",
"durability": {
"max": 1
}
}
}
}
}
}
minecraft:killed_by_crossbow
Triggers after the player hurts a mob or player. Available conditions:
- conditions:
- unique_entity_types: The exact count of types of entities killed.
- unique_entity_types: The acceptable range of count of types of entities killed.
- max: The maximum value.
- min: The minimum value.
- victims: A predicate for any of the killed entities.
- All possible conditions for entities
- victims: A list of predicates for any of the killed entities. All of the predicates must be matched, and one killed entity may match only one predicate.
- victims: A predicate for any of the killed entities.
- All possible conditions for entities
- victims: A predicate for any of the killed entities.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:killed_by_crossbow",
"conditions": {
"victims": [
{
"type": "minecraft:phantom"
},
{
"type": "minecraft:phantom"
}
],
"unique_entity_types": 5
}
}
}
}
minecraft:levitation
Triggers when the player has the levitation status effect. Available conditions:
- conditions:
- distance:
- absolute:
- max: The maximum value.
- min: The minimum value.
- horizontal:
- max: The maximum value.
- min: The minimum value.
- x:
- max: The maximum value.
- min: The minimum value.
- y:
- max: The maximum value.
- min: The minimum value.
- z:
- max: The maximum value.
- min: The minimum value.
- absolute:
- duration: The duration of the levitation in ticks.
- duration:
- max: The maximum value.
- min: The minimum value.
- distance:
An example
{
"criteria": {
"example": {
"trigger": "minecraft:levitation",
"conditions": {
"distance": {
"horizontal": {
"min": 5
},
"y": {
"min": 2
}
},
"duration": {
"min": 100
}
}
}
}
}
minecraft:location
Triggers every 20 ticks (1 second) and checks where the player is. Available conditions:
- conditions:
- Tags common to all locations
An example
{
"criteria": {
"example": {
"trigger": "minecraft:location",
"conditions": {
"biome": "jungle",
"feature": "jungle_pyramid",
"dimension": "minecraft:overworld",
"position": {
"x": 0,
"y": 60,
"z": {
"min": -10,
"max": 10
}
}
}
}
}
}
minecraft:nether_travel
Triggers when the player travels to the Nether and then returns to the Overworld. Available conditions:
- conditions:
- distance: The overworld distance between where the player entered the Nether and where the player exited the Nether.
- absolute:
- max: The maximum value.
- min: The minimum value.
- horizontal:
- max: The maximum value.
- min: The minimum value.
- x:
- max: The maximum value.
- min: The minimum value.
- y:
- max: The maximum value.
- min: The minimum value.
- z:
- max: The maximum value.
- min: The minimum value.
- absolute:
- distance: The overworld distance between where the player entered the Nether and where the player exited the Nether.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:nether_travel",
"conditions": {
"distance": {
"horizontal": {
"min": 1000
},
"absolute": {
"min": 1100
}
}
}
}
}
}
minecraft:placed_block
Triggers when the player places a block. Available conditions:
- conditions:
- block: The block that was placed. Accepts block IDs.
- item: The item that was used to place the block before the item was consumed.
- All possible conditions for items
- location: The location of the block that was placed.
- Tags common to all locations
- state: The block states of the block.
- <state_name>: A single block state, with the key name being the state name and the value being the required value of that state.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:placed_block",
"conditions": {
"block": "minecraft:wall_torch",
"state": {
"facing": "west"
},
"location": {
"position": {
"x": 10,
"z": 14
},
"biome": "minecraft:plains"
},
"item": {
"item": "minecraft:torch"
}
}
}
}
}
minecraft:player_hurt_entity
Triggers after the player hurts a mob or player. Available conditions:
- conditions:
- damage: The damage that was dealt
- Damage tags
- entity: The entity that was damaged.
- All possible conditions for entities
- damage: The damage that was dealt
An example
{
"criteria": {
"example": {
"trigger": "minecraft:player_hurt_entity",
"conditions": {
"damage": {
"blocked": true,
"type": {
"direct_entity": {
"type": "arrow"
}
}
},
"entity": {
"type": "player",
"nbt": "{Tags:[\"example\"]}"
}
}
}
}
}
minecraft:player_killed_entity
Triggers after a player is the source of a mob or player being killed. Available conditions:
- conditions:
- entity: The entity that was killed.
- All possible conditions for entities
- killing_blow: The type of damage that killed an entity.
- Tags common to all damage types
- entity: The entity that was killed.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:player_killed_entity",
"conditions": {
"entity": {
"type": "creeper",
"nbt": "{powered:1b}",
"location": {
"biome": "minecraft:the_void"
},
"effects": {
"minecraft:slowness": {},
"minecraft:weakness": {
"amplifier": {
"min": 2
}
}
}
},
"killing_blow": {
"source_entity": {
"nbt": "{SelectedItem:{id:\"minecraft:wooden_sword\"}}"
}
}
}
}
}
}
minecraft:recipe_unlocked
Triggers after the player unlocks a recipe (using a knowledge book for example). Available conditions:
- conditions:
- recipe: The recipe that was unlocked.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "minecraft:wooden_sword"
}
}
}
}
minecraft:shot_crossbow
Triggers when the player uses an item. Available conditions:
- conditions:
- item: The item that was used.
- All possible conditions for items
- item: The item that was used.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:shot_crossbow",
"conditions": {
"item": {
"item": "minecraft:crossbow"
}
}
}
}
}
minecraft:slept_in_bed
Triggers when the player enters a bed. Available conditions:
- conditions:
- location:
- Tags common to all locations
- location:
An example
{
"criteria": {
"example": {
"trigger": "minecraft:slept_in_bed",
"conditions": {
"location": {
"biome": "minecraft:desert",
"feature": "village",
"position": {
"y": {
"min": 50,
"max": 100
}
}
}
}
}
}
}
minecraft:slide_down_block
Triggers when the player slides down a block. Available conditions:
- conditions:
- block: The block that the player slided on.
minecraft:summoned_entity
Triggers after an entity has been summoned. Works with iron golems (pumpkin and iron blocks), snow golems (pumpkin and snow blocks), the ender dragon (ender crystals) and the wither (wither skulls and soul sand). Using dispensers to place the wither skulls or pumpkins will still activate this trigger. Spawn eggs, commands and mob spawners will not work however. Available conditions:
- conditions:
- entity:
- All possible conditions for entities
- entity:
An example
{
"criteria": {
"example": {
"trigger": "minecraft:summoned_entity",
"conditions": {
"entity": {
"type": "minecraft:snow_golem"
}
}
}
}
}
minecraft:tame_animal
Triggers after the player tames an animal. Available conditions:
- conditions:
- entity: Checks the entity that was tamed.
- All possible conditions for entities
- entity: Checks the entity that was tamed.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:tame_animal",
"conditions": {
"entity": {
"type": "minecraft:parrot",
"nbt": "{Variant:2}"
}
}
}
}
}
minecraft:tick
Triggers every tick (20 times a second).
An example
{
"criteria": {
"example": {
"trigger": "minecraft:tick"
}
}
}
minecraft:used_ender_eye
Triggers when the player uses an eye of ender (in a world where strongholds generate). Available conditions:
- conditions:
- distance: The horizontal distance between the player and the stronghold.
- distance:
- max: A maximum value.
- min: A minimum value.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:used_ender_eye",
"conditions": {
"distance": {
"min": 100,
"max": 200
}
}
}
}
}
minecraft:used_totem
Triggers when the players uses a totem. Available conditions:
- conditions:
- item: The item, only works with totem items.
- All possible conditions for items
- item: The item, only works with totem items.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:used_totem",
"conditions": {
"item": {
"item": "minecraft:totem_of_undying"
}
}
}
}
}
minecraft:villager_trade
Triggers after the player trades with a villager or a wandering trader. Available conditions:
- conditions:
- item: The item that was purchased. The "count" tag checks the count from one trade, not multiple.
- All possible conditions for items
- villager: The villager the item was purchased from.
- All possible conditions for entities
- item: The item that was purchased. The "count" tag checks the count from one trade, not multiple.
An example
{
"criteria": {
"example": {
"trigger": "minecraft:villager_trade",
"conditions": {
"item": {
"item": "minecraft:emerald",
"count": {
"min": 1
}
},
"villager": {
"nbt": "{VillagerData:{career:"minecraft:librarian"}}"
}
}
}
}
}
minecraft:voluntary_exile
Triggers when the player causes a raid and checks where the player is. Available conditions:
- conditions:
- Tags common to all locations
An example
{
"criteria": {
"example": {
"trigger": "minecraft:voluntary_exile",
"conditions": {
"biome": "minecraft:savanna",
"dimension": "minecraft:overworld",
"position": {
"x": 0,
"y": 60,
"z": {
"min": -10,
"max": 10
}
}
}
}
}
}