Damage Source
The arc:damage_source condition type checks the source of damage.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
source | string | ✅Required | - | The damage source to check. |
Example
The following example will prevent the player from taking fall damage.
data/my_datapack/arc/no_fall_damage.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_get_hurt",
"conditions": [
{
"type": "arc:damage_source",
"source": "fall"
}
],
"rewards": [
{
"type": "arc:cancel_action"
}
]
}
Compatible Action Types
💀 On Death
The arc:on_death action type is triggered when the player dies.
🤕 On Get Hurt
The arc:ongethurt action type is triggered when a player takes damage.
🗡️ On Hurt Entity
The arc:onhurtentity action type is triggered when a player hurts an entity.