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 Type | Description |
---|---|
arc:damageSource | Identifies the source of damage, such as an entity, environment, or effect. |
arc:damageAmount | Quantifies 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:
💥 Damage Source
🌍 Dimension
🪙✅ Item Equipped
🪙✋ Item In Hand
🪙📦 Item In Inventory
🚫 NOT
🔀 OR
📋 Scoreboard
👥 Team
Compatible Reward Types
The following reward types can be used with this action type: