Advancement Triggers

The advancement criteria Apoli adds, for advancements that react to powers and resources.

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.

Shape

{
  "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.

Advancement triggers are server-side and per player. They never fire for mobs or other entities, even ones that hold the power.