Origins: Powerful Powers
» Entity conditions » Last hit was crit

Last hit was crit

origins-powerful-powers:last_hit_was_critentity conditiontracked

True when the entity's most recent attack was a critical hit: the jump attack, or a fully drawn bow shot. It stays true until that entity attacks again without critting.

No fields.

  • Melee and arrows both count. A melee crit is vanilla's own decision (falling, not on the ground, not sprinting, not riding, attack charged), and an arrow counts when it was a critical arrow.
  • It's set as the hit resolves. Inside origins:modify_damage_dealt or origins:action_on_hit for that hit, it still holds the previous attack's answer. To react to a crit, run the check a tick later (an action_over_time with interval: 1 and a rising_action), or use critical_hit_eligible, which asks whether a hit would crit right now.
  • It's false until the entity's first attack, isn't saved, and resets when the server restarts.

Example: after landing a critical hit, you glow briefly.

json
{
  "type": "origins:action_over_time",
  "interval": 1,
  "condition": {
    "type": "origins-powerful-powers:last_hit_was_crit"
  },
  "rising_action": {
    "type": "origins:apply_effect",
    "effect": {
      "effect": "minecraft:glowing",
      "duration": 40
    }
  }
}

rising_action runs on the tick the condition turns true, which is the tick after the crit lands.

No attribute.