Action on fake entity hit
origins-powerful-powers:action_on_fake_entity_hitpower type
Runs when a player who can see one of the holder's fake entities hits it. The holder is the fake entity's spawner.
| Field | Type | Default | Description |
|---|---|---|---|
id | Integer | none | Only hits on this fake entity. Left out: any of the holder's fake entities. |
entity_action | Entity action | none | Runs on the holder. |
bientity_action | Bi-entity action | none | The actor is the player who hit it and the target is the fake entity. |
bientity_condition | Bi-entity condition | none | Same actor and target. Only runs when this is true. |
condition | Entity condition | none | Checked on the holder, like any power. |
- It runs for every behavior. A
passivefake entity also starts chasing whoever hit it. - The fake entity takes no damage or knockback. Use the actions to show the hit.
Example: a decoy that vanishes when it's hit and gives the attacker Slowness.
{
"type": "origins-powerful-powers:action_on_fake_entity_hit",
"bientity_action": {
"type": "origins:and",
"actions": [
{
"type": "origins:actor_action",
"action": {
"type": "origins:apply_effect",
"effect": {
"effect": "minecraft:slowness",
"duration": 60
}
}
},
{
"type": "origins:target_action",
"action": {
"type": "origins:execute_command",
"command": "particle minecraft:poof ~ ~1 ~ 0.3 0.5 0.3 0 20"
}
}
]
},
"entity_action": {
"type": "origins-powerful-powers:despawn_fake_entity"
}
}despawn_fake_entity without an id removes all of the holder's fake entities. With several out at once, give each an id and a matching action_on_fake_entity_hit.