near_entity
Passes when the specified number of matching entities are within the given radius.
Categories: entity
Required arguments
| Key(s) | Description | Type |
|---|---|---|
entities | The list of entity types to look for nearby. | ENTITY_LIST |
radius | The radius in blocks to search for nearby entities. | EXPRESSION |
Optional arguments
| Key(s) | Description | Type | Default |
|---|---|---|---|
amount | The minimum number of matching entities required (defaults to 1). | INT | 1 |
Example
conditions:
- id: near_entity
args:
entities:
- <value>
radius: 5 + %level% * 0.5
amount: 1 # ← Optional