Action on start tracking
origins-powerful-powers:action_on_start_trackingpower type
Runs actions when the server starts sending an entity to the holder. Players only.
| Field | Type | Default | Description |
|---|---|---|---|
bientity_action | Bi-entity action | optional | Actor: the holder. Target: the entity now being sent. |
bientity_condition | Bi-entity condition | optional | If set, the action only runs when it's true. |
- It's based on network range: the entity type's tracking range, scaled by the server's
entity-broadcast-range-percentageand capped by view distance. Walls, look direction and invisibility are ignored. - It fires again each time the entity comes back into range, and for every entity near a player who joins or teleports, so keep its condition cheap.
Example: you hear a heartbeat when a warden comes into range.
{
"type": "origins-powerful-powers:action_on_start_tracking",
"bientity_condition": {
"type": "origins:target_condition",
"condition": {
"type": "origins:entity_type",
"entity_type": "minecraft:warden"
}
},
"bientity_action": {
"type": "origins:actor_action",
"action": {
"type": "origins:execute_command",
"command": "playsound minecraft:entity.warden.heartbeat player @s"
}
}
}