Origins: Powerful Powers
» Damage conditions » Damage source NBT

Damage source NBT

origins-powerful-powers:damage_source_nbtdamage condition

Checks one NBT value on the entity that directly caused the damage: the arrow or other projectile for ranged hits, or the attacker for melee.

FieldTypeDefaultDescription
keyStringrequiredA top-level NBT key of that entity
valueStringrequiredThe text the value must equal
  • False when there's no direct entity, as with fall damage, fire or drowning.
  • The value is compared as text. Strings are compared as they are. Other values use their SNBT form, so a number includes its suffix (1b, 5, 1.5d) and a list includes its brackets. Vanilla saves true/false as bytes, so "true" is 1b.
  • Only top-level keys work. Paths like Item.id don't.
  • For the projectile type, use Origins' origins:projectile damage condition.

Example: crossbow bolts hurt you less.

json
{
  "type": "origins:modify_damage_taken",
  "damage_condition": {
    "type": "origins-powerful-powers:damage_source_nbt",
    "key": "ShotFromCrossbow",
    "value": "1b"
  },
  "modifier": {
    "operation": "multiply_total_multiplicative",
    "value": -0.3
  }
}

Arrows shot from a crossbow deal 30% less damage to you.