Damage Source
The arc:damage_source condition type checks the source of damage.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
source | string | ❌Optional | any | The damage source msg id. |
direct_entity_type | EntityType | ❌Optional | - | The entity type of the direct source. |
causing_entity_type | EntityType | ❌Optional | - | The entity type of the causing entity. |
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 Block With Shield
The arc:onblockwith_shield action type is triggered when a player successfully blocks damage using a shield.
💀 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.
🩸 On Hurt Player
The arc:onhurtplayer action type is triggered when a player hurts another player.
💀 On Kill Entity
The arc:onkillentity action type is triggered when a player kills an entity.