Skip to main content

Damage Condition Types

Damage conditions check properties of damage instances.

origins:amount

Checks the damage amount.

FieldTypeDefaultDescription
comparisonStringrequiredComparison operator
compare_toFloatrequiredDamage amount
Example
"damage_condition": {
"type": "origins:amount",
"comparison": "==",
"compare_to": 4
}

This example will check if the damage dealt/taken is equal to 2 hearts.

origins:attacker

Checks the source entity (attacker).

FieldTypeDefaultDescription
entity_conditionEntity ConditionrequiredCondition on the attacker

origins:id

Checks the damage type ID.

FieldTypeDefaultDescription
valueIdentifieroptionalDamage type ID
Example
"damage_condition": {
"type": "origins:name",
"name": "inWall"
}

This example will check if the damage source name is inWall, meaning that the condition will evaluate to true if the entity is suffocating in a block.

origins:in_tag

Checks if the damage type is in a damage type tag.

FieldTypeDefaultDescription
tagIdentifierrequiredDamage type tag ID

origins:magic

Unstable

This condition is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Checks whether the damage is classified as magic damage, such as potion or dragon-breath damage.

FieldTypeDefaultDescription
None---

origins:projectile

Example
"damage_condition": {
"type": "origins:projectile",
"projectile": "minecraft:spectral_arrow"
}

This example will check if the damage source is a Spectral Arrow projectile entity.

Checks if the damage is from a projectile.

origins:type

Checks the damage type (similar to id).

FieldTypeDefaultDescription
typeIdentifieroptionalDamage type ID