Returns the closest entity to this entity
If `type` is an entity id, (e.g. `minecraft:bee`), only entities of that type will be considered
Radius defaults to 20, and controls the size of the area for checking entities as a box expanding in every direction from the player
overload 1:
ViewerAPI:getNearestEntity(type, radius)
Method Property | Fluent Description | Representation |
type accepts | a String | |
radius accepts | a Number | |
Return Value | an EntityAPI | |
overload 2:
ViewerAPI:getNearestEntity(type)
Method Property | Fluent Description | Representation |
type accepts | a String | |
Return Value | an EntityAPI | |
overload 3:
ViewerAPI:getNearestEntity()
Method Property | Fluent Description | Representation |
Return Value | an EntityAPI | |