getNearbyEntitiesOfType

abstract fun <E : Entity> getNearbyEntitiesOfType(position: Position, range: Double, type: Class<E>, callback: Consumer<E>)

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

Parameters

E

the entity type

position

the centre position to look around

range

the range to look for entities in

type

the type of entities to find

callback

the callback called for each entity found


abstract fun <E : Entity> getNearbyEntitiesOfType(position: Position, range: Double, type: Class<E>): Collection<E>

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

Return

all found entities of the given type

Parameters

E

the entity type

position

the centre position to look around

range

the range to look for entities in

type

the type of entities to find