Repository navigation
Is Nearest (Bientity Condition Type)
Zac edited this page Nov 11, 2026
·
1 revision
Checks if the target entity is the nearest entity to the actor.
Tip
Use the bientity_condition to check for entity types or to find the second nearest entity.
originscontent:is_nearest
| Field | Type | Default | Description |
|---|---|---|---|
distance |
Float | 64.0 |
The max distance to check for nearby entities. |
bientity_condition |
Bientity Condition | null |
Entities to ignore while searching for nearby entities. If null, assume condition passed. The actor is the, well, actor, and the target is the other entity. |
"bientity_condition": {
"type": "originscontent:is_nearest",
"bientity_condition": {
"type": "origins:target_condition",
"condition": {
"type": "origins:entity_type",
"entity_type": "minecraft:player"
}
}
}This example checks if the target is the nearest player to the actor.
"bientity_condition": {
"type": "origins:or",
"conditions": [
{
"type": "originscontent:is_nearest"
},
{
"type": "originscontent:is_nearest",
"bientity_condition": {
"type": "originscontent:is_nearest",
"inverted": true
}
},
{
"type": "originscontent:is_nearest",
"bientity_condition": {
"type": "origins:and",
"conditions": [
{
"type": "originscontent:is_nearest",
"inverted": true
},
{
"type": "originscontent:is_nearest",
"bientity_condition": {
"type": "originscontent:is_nearest",
"inverted": true
},
"inverted": true
}
]
}
}
]
}This example checks if the entity is one of the three nearest entities to the actor.
- Action on Reeling
- Action on Thunder
- Cancel Inventory Actions
- Cancel Totems
- Disable Offhand
- Modify Minimum Sprinting Hunger
- Override Hotbar
- Prevent Chat
- Prevent Diving
- Reflect Damage
- Ticking Entity
- Action as Nearest
- Crash
- Dive
- Emerge
- Display Toast
- Open Steam Game
- Positioned Screenshake
- Screenshake
- Set Black Rain Duration
- Trigger Thunder
- Discombobulate