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.
| Field | Type | Default | Description |
|---|---|---|---|
key | String | required | A top-level NBT key of that entity |
value | String | required | The 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" is1b. - Only top-level keys work. Paths like
Item.iddon't. - For the projectile type, use Origins'
origins:projectiledamage condition.
Example: crossbow bolts hurt you less.
{
"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.