rangeOf

fun List<Entity>.rangeOf(filterInRadius: Double, center: Entity): List<Entity>

Filters entities from this list that are within the specified radius from a center entity.

Return

A list of entities within the specified radius.

Parameters

filterInRadius

The maximum distance (in blocks) from the center entity.

center

The entity to measure distance from.


fun Entity.rangeOf(filterInRadius: Double): Collection<Entity>

Gets all entities within the specified radius from this entity's location.

Return

A collection of entities within the specified radius.

Parameters

filterInRadius

The maximum distance (in blocks) from this entity.