Origins: Powerful Powers
» Entity conditions » Last damage type

Last damage type

origins-powerful-powers:last_damage_typeentity conditiontracked

True when the most recent hit was of this damage type.

FieldTypeDefaultDescription
valueStringrequiredThe damage type's message id
  • It's the message id, the name death messages use. For example, the damage type minecraft:player_attack has the message id player. Common ones: fall, player, mob, arrow, lava, inFire, onFire, drown, magic. (From source: vanilla damage type data.)
  • It's "" until the entity first takes damage, and keeps its value until the next hit.

Example: land roll.

json
{
  "type": "origins:action_over_time",
  "interval": 1,
  "condition": {
    "type": "origins:and",
    "conditions": [
      {
        "type": "origins-powerful-powers:hurt_time",
        "comparison": ">=",
        "compare_to": 9
      },
      {
        "type": "origins-powerful-powers:last_damage_type",
        "value": "fall"
      }
    ]
  },
  "entity_action": {
    "type": "origins:apply_effect",
    "effect": {
      "effect": "minecraft:speed",
      "duration": 40,
      "amplifier": 1
    }
  }
}

Right after taking fall damage, you get Speed II for 2 seconds.