Distance to nearest player
origins-powerful-powers:distance_to_nearest_playerentity condition
The distance, in blocks, to the closest other player in the same dimension. With no other players there, it's a huge number, so ">" checks are true.
| Field | Type | Default | Description |
|---|---|---|---|
comparison | Comparison | required | |
compare_to | Double | required | blocks |
Example: hermit.
{
"type": "origins:action_over_time",
"interval": 40,
"condition": {
"type": "origins-powerful-powers:distance_to_nearest_player",
"comparison": ">",
"compare_to": 100
},
"entity_action": {
"type": "origins:apply_effect",
"effect": {
"effect": "minecraft:regeneration",
"duration": 50,
"amplifier": 0
}
}
}More than 100 blocks from everyone else, you slowly regenerate.
Attribute: distance_to_nearest_player (clamped to 1,000,000)