getNearbyEntitiesByType

inline fun <E : Entity> Location.getNearbyEntitiesByType(radius: Double = 1.0): List<E>

Gets all nearby entities of type E within the specified radius.

Return

A list of entities of type E within the radius

Parameters

radius

The radius in all directions (x, y, z) to search for entities

Type Parameters

E

The type of entities to retrieve


inline fun <E : Entity> Location.getNearbyEntitiesByType(x: Double = 1.0, y: Double = 1.0, z: Double = 1.0): List<E>

Gets all nearby entities of type E within the specified dimensions.

Return

A list of entities of type E within the specified dimensions

Parameters

x

The radius in the x direction

y

The radius in the y direction

z

The radius in the z direction

Type Parameters

E

The type of entities to retrieve


inline fun <E : Entity> Location.getNearbyEntitiesByType(radius: Double = 1.0, predicate: (E) -> Boolean = { true }): List<E>

Gets all nearby entities of type E within the specified radius that match the predicate.

Return

A list of entities of type E within the radius that match the predicate

Parameters

radius

The radius in all directions (x, y, z) to search for entities

predicate

A filter function to select specific entities

Type Parameters

E

The type of entities to retrieve


inline fun <E : Entity> Location.getNearbyEntitiesByType(x: Double = 1.0, y: Double = 1.0, z: Double = 1.0, predicate: (E) -> Boolean = { true }): List<E>

Gets all nearby entities of type E within the specified dimensions that match the predicate.

Return

A list of entities of type E within the specified dimensions that match the predicate

Parameters

x

The radius in the x direction

y

The radius in the y direction

z

The radius in the z direction

predicate

A filter function to select specific entities

Type Parameters

E

The type of entities to retrieve