Heal (Entity Action Type)
Restores health to the entity. A negative amount takes health away instead.
Type ID: apoli:heal
Fields
| Field | Type | Default | Description |
|---|---|---|---|
amount | Float or Expression | required | How much health to restore. A negative amount removes that much health. |
Examples
"entity_action": {
"type": "apoli:heal",
"amount": 6
}This restores 3 hearts.
"entity_action": {
"type": "apoli:heal",
"amount": -4
}This takes 2 hearts away.
note
A negative amount changes health directly. Armor, absorption and damage modifiers don't apply, and the entity doesn't flinch. If it would leave the entity at 0 health or less, the action deals lethal minecraft:generic damage instead, so the entity dies normally (death message, drops, apoli:action_on_death) and a Totem of Undying or apoli:prevent_death can still save it. An entity that can't take that damage, like a player in Creative mode, keeps its current health.