Damage Condition Types
Damage conditions check properties of damage instances.
origins:amount
Checks the damage amount.
| Field | Type | Default | Description |
|---|---|---|---|
comparison | String | required | Comparison operator |
compare_to | Float | required | Damage 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).
| Field | Type | Default | Description |
|---|---|---|---|
entity_condition | Entity Condition | required | Condition on the attacker |
origins:id
Checks the damage type ID.
| Field | Type | Default | Description |
|---|---|---|---|
value | Identifier | optional | Damage 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.
| Field | Type | Default | Description |
|---|---|---|---|
tag | Identifier | required | Damage type tag ID |
origins:magic
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.
| Field | Type | Default | Description |
|---|---|---|---|
| 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).
| Field | Type | Default | Description |
|---|---|---|---|
type | Identifier | optional | Damage type ID |