Skip to main content

Get Hurt

The arc:on_get_hurt action type is triggered when a player takes damage.

Action Data

When this action is triggered, the following action data is made available to be used by conditions and rewards:

Action Data TypeDescription
arc:damageSourceIdentifies the source of damage, such as an entity, environment, or effect.
arc:damageAmountQuantifies the amount of damage dealt or received in an action.

Example

The following example will give the player a diamond every time they take damage from a zombie.

data/my_datapack/arc/diamond_for_zombie_damage.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_get_hurt",
"conditions": [
{
"type": "arc:damage_source",
"source": "mob",
"direct_entity_type": "minecraft:zombie"
}
],
"rewards": [
{
"type": "arc:item",
"item": {
"id": "minecraft:diamond"
}
}
]
}

Compatible Condition Types

The following condition types can be used with this action type:

Compatible Reward Types

The following reward types can be used with this action type: