Advancements/List of triggers

From Minecraft Wiki
Jump to: navigation, search

Here is a list of triggers for advancements.

Triggers[edit]

minecraft:bred_animals[edit]

Triggers after the player breeds 2 animals. Available conditions:

minecraft:brewed_potion[edit]

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

minecraft:changed_dimension[edit]

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.

minecraft:channeled_lightning[edit]

Triggers after the player successfully uses the Channeling enchantment on an entity. Available conditions:

minecraft:construct_beacon[edit]

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.

minecraft:consume_item[edit]

Triggers when the player consumes an item. Available conditions:

minecraft:cured_zombie_villager[edit]

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

minecraft:effects_changed[edit]

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:enchanted_item[edit]

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.
    •  levels: The levels spent by the player on the enchantment.
    •  levels:
      •  max: The maximum value.
      •  min: The minimum value.

minecraft:enter_block[edit]

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.

minecraft:entity_hurt_player[edit]

Triggers after a player gets hurt. Available conditions:

minecraft:entity_killed_player[edit]

Triggers after an entity kills a player. Available conditions:

minecraft:filled_bucket[edit]

Triggers after the player fills a bucket. Available conditions:

minecraft:fishing_rod_hooked[edit]

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

minecraft:hero_of_the_village[edit]

Triggers when the player defeats a raid and checks where the player is. Available conditions:

minecraft:impossible[edit]

Triggers only using commands.

minecraft:inventory_changed[edit]

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.
    •  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.

minecraft:item_durability_changed[edit]

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.

minecraft:killed_by_crossbow[edit]

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.
    •  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.

minecraft:levitation[edit]

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.
    •  duration: The duration of the levitation in ticks.
    •  duration:
      •  max: The maximum value.
      •  min: The minimum value.

minecraft:location[edit]

Triggers every 20 ticks (1 second) and checks where the player is. Available conditions:

minecraft:nether_travel[edit]

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.

minecraft:placed_block[edit]

Triggers when the player placed 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.
    •  location: The location of the block that was placed.
    •  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.

minecraft:player_hurt_entity[edit]

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

minecraft:player_killed_entity[edit]

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

minecraft:recipe_unlocked[edit]

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

  •  conditions:
    •  recipe: The recipe that was unlocked.

minecraft:shot_crossbow[edit]

Triggers when the player placed a block. Available conditions:

minecraft:slept_in_bed[edit]

Triggers when the player enters a bed. Available conditions:

minecraft:summoned_entity[edit]

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:

minecraft:tame_animal[edit]

Triggers after the player tames an animal. Available conditions:

minecraft:tick[edit]

Triggers every tick (20 times a second).

minecraft:used_ender_eye[edit]

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.

minecraft:used_totem[edit]

Triggers when the players uses a totem. Available conditions:

minecraft:villager_trade[edit]

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

minecraft:voluntary_exile[edit]

Triggers when the player causes a raid and checks where the player is. Available conditions: