Action On Entity Death#
Since v1.0.0
Executes an action when an entity on the server dies.
Type ID: voile:action_on_entity_death
Note
In the context of this power type, the 'actor' entity is the entity that has the power whilst the 'target' entity is the entity that died.
Warning
The damage amount in the damage condition always evaluates to 0
.
Fields#
Field | Type | Default | Description |
---|---|---|---|
bientity_action |
Bi-entity Action Type | The action to be executed on either or both the 'actor' and 'target' entities. | |
bientity_condition |
Bi-entity Condition Type | optional | If specified, the specified action will only be executed if this condition is fulfilled by either or both 'actor' and 'target' entities. |
damage_condition |
Damage Condition Type | optional | If specified, the specified action will only be executed if this condition is fulfilled by the damage that killed the 'target' entity. |
Examples#
{
"type": "voile:action_on_entity_death",
"bientity_action": {
"type": "apoli:actor_action",
"action": {
"type": "apoli:execute_command",
"command": "title @s actionbar \"A pig has died!\""
}
},
"bientity_condition": {
"type": "apoli:target_condition",
"condition": {
"type": "apoli:entity_type",
"entity_type": "minecraft:pig"
}
},
"damage_condition": {
"type": "apoli:in_tag",
"tag": "minecraft:is_fall"
}
}
This example will execute a command that displays a message in the action bar of the entity that has the power when a pig dies from fall damage.