Skip to main content

Damage Source

The arc:damage_source condition type checks the source of damage.

Parameters

ParameterTypeRequiredDefaultDescription
sourcestringRequired-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