Skip to main content

Advancement Triggers

Apoli registers vanilla advancement triggers, so an advancement can fire on something a power did. They go in the criteria block of an advancement JSON like any vanilla trigger, and they take the usual optional player entity predicate on top of their own fields.

TriggerFires when
apoli:powerA power is granted to the player.
apoli:resourceA resource or cooldown the player holds changes value.

Origins adds one of its own: origins:chose_origin.

Example

{
  "criteria": {
    "mana_master": {
      "trigger": "apoli:resource",
      "conditions": {
        "resource": "example:mana",
        "value": { "min": 100 }
      }
    }
  },
  "requirements": [["mana_master"]]
}

Everything in conditions is optional. A trigger with an empty conditions block fires on any occurrence of its event.

note

Advancement triggers run on the server, for each player. They never fire for mobs or other entities, even ones that hold the power.