Skip to main content

Get 25% OFF on your first order with BisectHosting using code "DAQEM"!

Damage Source

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

Parameters

ParameterTypeRequiredDefaultDescription
sourcestringOptionalanyThe damage source msg id.
direct_entity_typeEntityTypeOptional-The entity type of the direct source.
causing_entity_typeEntityTypeOptional-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