Damage Entity
Deals damage to an entity.
Type ID: kaya:damage_entity
Format
| Field | Type | Default | Description |
|---|---|---|---|
damage_type |
Identifier | The ID of the damage type to use. | |
amount |
Float Provider | The amount of damage to deal. | |
victim |
Entity Provider | The entity that will be damaged. | |
attacker |
Entity Provider | optional | If specified, this entity will be considered as the source of the damage. |
Example
{
"type": "kaya:damage_entity",
"damage_type": "minecraft:magic",
"amount": {
"type": "kaya:random/uniform",
"min": 1.0,
"max": 8.0
},
"victim": "target",
"attacker": "actor"
}
This example will deal a random amount (ranging from $1.0$ to $8.0$) of damage to the entity provided by the kaya:target_entity context parameter, making the entity provided by the kaya:actor_entity context parameter as the source of the damage.
History
| Minecraft | Mod | Changelog |
| 1.21.5 | 0.1.0 | Added the type. |