Buy Me a Coffee at ko-fi.com

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:
EntityAPI.getNearestEntity(type: String, radius: Number): EntityAPI
typings.-1808118735typings.-1950496919typings.1263373079
Method PropertyFluent DescriptionRepresentation
type accepts
radius accepts
Return Value
overload 2:
EntityAPI.getNearestEntity(type: String): EntityAPI
typings.-1808118735typings.1263373079
Method PropertyFluent DescriptionRepresentation
type accepts
Return Value
overload 3:
EntityAPI.getNearestEntity(): EntityAPI
typings.1263373079
Method PropertyFluent DescriptionRepresentation
Return Value