Entity In Radius - Provismet/Provi-Origins GitHub Wiki
Similar to Block In Radius but instead looks for nearby entities that fulfill a given condition.
Type ID: proviorigins:entity_in_radius
Fields
| Field | Type | Default | Description |
|---|---|---|---|
entity_condition |
Entity Condition Type | The condition to check on entities within radius. | |
radius |
Float | The radius to search around this entity. | |
include_self |
Boolean | true |
Whether or not this entity should be included in the search results. |
comparison |
Comparison | ">=" |
How the amount of entities within the specified radius which fulfills the specified entity condition type should be compared to the specified value. |
compare_to |
Integer | 1 |
The value to compare to. |
Examples
"entity_condition": {
"type": "proviorigins:entity_in_radius",
"radius": 12,
"entity_condition": {
"type": "origins:entity_type",
"entity_type": "minecraft:zombie"
},
"compare_to": 3
}
This example will return true if there are 3 or more zombies within 12 blocks of the player.