Interface EntityAccessor
- All Known Subinterfaces:
World
public interface EntityAccessor
-
Method Summary
Modifier and TypeMethodDescriptionnearbyEntities
(AABB box) Collects all entities inside a bounding box.nearbyEntities
(AABB box, Predicate<Entity> predicate) Collects all entities inside a bounding box that satisfy the given predicate.nearbyEntities
(AABB box, Predicate<Entity> predicate, int limit) Collects all entities inside a bounding box that satisfy the given predicate.nearbyEntities
(me.moros.math.Vector3d pos, double radius) Collects all entities in a sphere.nearbyEntities
(me.moros.math.Vector3d pos, double radius, Predicate<Entity> predicate) Collects all entities in a sphere that satisfy the given predicate.nearbyEntities
(me.moros.math.Vector3d pos, double radius, Predicate<Entity> predicate, int limit) Collects all entities in a sphere that satisfy the given predicate.
-
Method Details
-
nearbyEntities
Collects all entities in a sphere.- Parameters:
pos
- the center pointradius
- the radius of the sphere- Returns:
- all collected entities
- See Also:
-
nearbyEntities
default List<Entity> nearbyEntities(me.moros.math.Vector3d pos, double radius, Predicate<Entity> predicate) Collects all entities in a sphere that satisfy the given predicate.- Parameters:
pos
- the center pointradius
- the radius of the spherepredicate
- the predicate that needs to be satisfied for every block- Returns:
- all collected entities
- See Also:
-
nearbyEntities
default List<Entity> nearbyEntities(me.moros.math.Vector3d pos, double radius, Predicate<Entity> predicate, int limit) Collects all entities in a sphere that satisfy the given predicate.Note: Limit is only respected if positive. Otherwise, all entities that satisfy the given predicate are collected.
- Parameters:
pos
- the center pointradius
- the radius of the spherepredicate
- the predicate that needs to be satisfied for every blocklimit
- the amount of entities to collect- Returns:
- all collected entities
- See Also:
-
nearbyEntities
Collects all entities inside a bounding box.- Parameters:
box
- the bounding box to check- Returns:
- all collected entities
- See Also:
-
nearbyEntities
Collects all entities inside a bounding box that satisfy the given predicate.- Parameters:
box
- the bounding box to checkpredicate
- the predicate that needs to be satisfied for every block- Returns:
- all collected entities
- See Also:
-
nearbyEntities
Collects all entities inside a bounding box that satisfy the given predicate.Note: Limit is only respected if positive. Otherwise, all entities that satisfy the given predicate are collected.
- Parameters:
box
- the bounding box to checkpredicate
- the predicate that needs to be satisfied for every blocklimit
- the amount of entities to collect- Returns:
- all collected entities
- See Also:
-