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

Minecraft:Advancement definition

From SAS Gaming Wiki

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

File format

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

Legend

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

Display

Within the root tag of an advancement JSON object, the Template:Nbt object and the Template:Nbt string, both optional, are related to the display of the advancement.

If the Template:Nbt tag is present, it must have the Template:NbtTemplate:Nbt, Template:NbtTemplate:Nbt and Template:Nbt fields present in order to be considered as valid advancement display data.

The Template:Nbt 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 Template:Cmd usage.

Advancement tabs

Creating a root advancement (no Template:Nbt) with valid Template:Nbt 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 Minecraft: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 Template:Nbt 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 Minecraft:commands or functions for more functionalities and a more flexible control. These advancements should not have the Template:Nbt 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:

List of triggers

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

The possible values for Template:Nbt and associated extra contents in Template:Nbt:

Template:Columns-list

minecraft:allay_drop_item_on_block

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

minecraft:any_block_use

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

  • Template:Nbt:
    • Template:Nbt: Specifies a list of Minecraft: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 Template:Cd entity is the player that would get the advancement.

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:

minecraft:bred_animals

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

minecraft:brewed_potion

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

minecraft:changed_dimension

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

minecraft:channeled_lightning

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

minecraft:construct_beacon

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

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 Minecraft:crafter when it crafts a recipe. Available extra conditions:

minecraft:cured_zombie_villager

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

minecraft:default_block_use

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

minecraft:effects_changed

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

minecraft:enchanted_item

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

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:

minecraft:entity_hurt_player

Triggers after a player gets hurt (even when it's not caused by an entity)<ref>Template:Bug</ref>. Available extra conditions:

minecraft:entity_killed_player

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

minecraft:fall_after_explosion

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

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:

minecraft:hero_of_the_village

Triggers when a Minecraft: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 the player's Minecraft:inventory. Available extra conditions:

minecraft:item_durability_changed

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

minecraft:item_used_on_block

Triggers when the player Template:Control 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 Minecraft:campfire if there isn't a Minecraft: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:

minecraft:kill_mob_near_sculk_catalyst

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

minecraft:killed_by_arrow

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

minecraft:levitation

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

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:

minecraft:location

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

minecraft:nether_travel

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

minecraft:placed_block

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

minecraft:player_generates_container_loot

Triggers when the player generates the contents of a container with a loot table set. Available extra conditions:

minecraft:player_hurt_entity

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

minecraft:player_interacted_with_entity

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

minecraft:player_killed_entity

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

minecraft:player_sheared_equipment

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

minecraft:recipe_crafted

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

minecraft:recipe_unlocked

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

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 Minecraft:bed. No extra conditions.

minecraft:slide_down_block

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

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 Minecraft:entity has been summoned. Works with Minecraft:iron golems (iron blocks and pumpkin), Minecraft:snow golems (snow blocks and pumpkin), Minecraft:copper golems (copper block and pumpkin), the Minecraft:ender dragon (end crystals) and the Minecraft:wither (soul sand/soul soil and wither skulls). Using Minecraft:dispensers, commands, or Minecraft:pistons to place the wither skulls or pumpkins still activate this trigger. Available extra conditions:

minecraft:tame_animal

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

minecraft:target_hit

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

minecraft:thrown_item_picked_up_by_entity

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

minecraft:thrown_item_picked_up_by_player

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

minecraft:tick

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

minecraft:used_ender_eye

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

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 Minecraft:bows, Minecraft:crossbows, Minecraft:honey bottles, Minecraft:milk buckets, Minecraft:potions, Minecraft:shields, Minecraft:spyglasses, Minecraft:tridents, food items, eyes of ender, etc. Most items that activate from a single click, such as Minecraft:fishing rods, do not affect this trigger. Available extra conditions:

minecraft:villager_trade

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

minecraft:voluntary_exile

Triggers when the player causes a Minecraft: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:

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

Temporary triggers

Minecraft:23w13a_or_b

minecraft:voted

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

Minecraft:24w14potato

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:

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:

  • Template:Nbt:
    • Template:Nbt*: The minimum lubrication factor the thrown item must have. This condition does not support a min-max range.

Minecraft:25w14craftmine

minecraft:consume_poisonous_potatoes

Triggers when the player consumes a poisonous potato that causes their Template:Cd 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:

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.

External links

References

Template:Reflist

Navigation

Template:Navbox Java Edition technical

Template:Navbox Java Edition

Minecraft:de:Fortschrittsdefinition Minecraft:fr:Définition de progrès Minecraft:ja:進捗/JSONフォーマット Minecraft:pt:Definição de progressos Minecraft:ru:Достижение (Java Edition)/Формат JSON Minecraft:zh:进度定义格式

Contents