getNearbyEntities

abstract fun getNearbyEntities(position: Position, range: Double, callback: Consumer<Entity>)

Gets all entities that are within the given range of the given position, calling the given callback for each entity found.

Parameters

position

the centre position to look around

range

the range to look for entities in

callback

the callback called for each entity found


abstract fun getNearbyEntities(position: Position, range: Double): Collection<Entity>

Gets all entities that are within the given range of the given position.

Return

all found entities

Parameters

position

the centre position to look around

range

the range to look for entities in