public interface EntityView
Modifier and Type | Method and Description |
---|---|
default <T extends LivingEntity> |
getClosestEntity(Class<? extends T> entityClass,
TargetPredicate targetPredicate,
LivingEntity entity,
double x,
double y,
double z,
Box box) |
default <T extends LivingEntity> |
getClosestEntity(List<? extends T> entityList,
TargetPredicate targetPredicate,
LivingEntity entity,
double x,
double y,
double z) |
default <T extends LivingEntity> |
getClosestEntityIncludingUngeneratedChunks(Class<? extends T> entityClass,
TargetPredicate targetPredicate,
LivingEntity entity,
double x,
double y,
double z,
Box box) |
default PlayerEntity |
getClosestPlayer(double x,
double y,
double z,
double maxDistance,
boolean ignoreCreative) |
default PlayerEntity |
getClosestPlayer(double x,
double y,
double z,
double maxDistance,
Predicate<Entity> targetPredicate) |
default PlayerEntity |
getClosestPlayer(Entity entity,
double maxDistance) |
default PlayerEntity |
getClosestPlayer(TargetPredicate targetPredicate,
double x,
double y,
double z) |
default PlayerEntity |
getClosestPlayer(TargetPredicate targetPredicate,
LivingEntity entity) |
default PlayerEntity |
getClosestPlayer(TargetPredicate targetPredicate,
LivingEntity entity,
double x,
double y,
double z) |
<T extends Entity> |
getEntitiesByClass(Class<? extends T> entityClass,
Box box,
Predicate<? super T> predicate)
Computes a list of entities within some box whose runtime Java class is the same as or is
a subclass of the given class.
|
default <T extends Entity> |
getEntitiesIncludingUngeneratedChunks(Class<? extends T> entityClass,
Box box) |
default <T extends Entity> |
getEntitiesIncludingUngeneratedChunks(Class<? extends T> entityClass,
Box box,
Predicate<? super T> predicate) |
default Stream<VoxelShape> |
getEntityCollisions(Entity entity,
Box box,
Predicate<Entity> predicate) |
default <T extends Entity> |
getNonSpectatingEntities(Class<? extends T> entityClass,
Box box) |
default List<Entity> |
getOtherEntities(Entity except,
Box box)
Computes a list of entities within some box, excluding the given entity, that are not spectators.
|
List<Entity> |
getOtherEntities(Entity except,
Box box,
Predicate<? super Entity> predicate)
Computes a list of entities within some box, excluding the given entity, that satisfy the given predicate.
|
default PlayerEntity |
getPlayerByUuid(UUID uuid) |
List<? extends PlayerEntity> |
getPlayers() |
default List<PlayerEntity> |
getPlayers(TargetPredicate targetPredicate,
LivingEntity entity,
Box box) |
default <T extends LivingEntity> |
getTargets(Class<? extends T> entityClass,
TargetPredicate targetPredicate,
LivingEntity targetingEntity,
Box box) |
default boolean |
intersectsEntities(Entity entity,
VoxelShape shape) |
default boolean |
isPlayerInRange(double x,
double y,
double z,
double range) |
List<Entity> getOtherEntities(@Nullable Entity except, Box box, @Nullable Predicate<? super Entity> predicate)
except
- the entity the box logically surrounds. This entity is ignored if it is inside the box.box
- the box in which to search for entitiespredicate
- a predicate which entities must satisfy in order to be included in the returned list.<T extends Entity> List<T> getEntitiesByClass(Class<? extends T> entityClass, Box box, @Nullable Predicate<? super T> predicate)
entityClass
- the class the list of entities must extendbox
- the box in which to search for entitiespredicate
- a predicate which entities must satisfy in order to be included in the returned listdefault <T extends Entity> List<T> getEntitiesIncludingUngeneratedChunks(Class<? extends T> entityClass, Box box, @Nullable Predicate<? super T> predicate)
List<? extends PlayerEntity> getPlayers()
default List<Entity> getOtherEntities(@Nullable Entity except, Box box)
except
- the entity the box logically surrounds. This entity is ignored if it is inside the box.box
- the box in which to search for entities#getSurroundingEntities(Entity, Box, Predicate)
,
Entity.isSpectator()
default boolean intersectsEntities(@Nullable Entity entity, VoxelShape shape)
default <T extends Entity> List<T> getNonSpectatingEntities(Class<? extends T> entityClass, Box box)
default <T extends Entity> List<T> getEntitiesIncludingUngeneratedChunks(Class<? extends T> entityClass, Box box)
default Stream<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box box, Predicate<Entity> predicate)
@Nullable default PlayerEntity getClosestPlayer(double x, double y, double z, double maxDistance, @Nullable Predicate<Entity> targetPredicate)
@Nullable default PlayerEntity getClosestPlayer(Entity entity, double maxDistance)
@Nullable default PlayerEntity getClosestPlayer(double x, double y, double z, double maxDistance, boolean ignoreCreative)
default boolean isPlayerInRange(double x, double y, double z, double range)
@Nullable default PlayerEntity getClosestPlayer(TargetPredicate targetPredicate, LivingEntity entity)
@Nullable default PlayerEntity getClosestPlayer(TargetPredicate targetPredicate, LivingEntity entity, double x, double y, double z)
@Nullable default PlayerEntity getClosestPlayer(TargetPredicate targetPredicate, double x, double y, double z)
@Nullable default <T extends LivingEntity> T getClosestEntity(Class<? extends T> entityClass, TargetPredicate targetPredicate, @Nullable LivingEntity entity, double x, double y, double z, Box box)
@Nullable default <T extends LivingEntity> T getClosestEntityIncludingUngeneratedChunks(Class<? extends T> entityClass, TargetPredicate targetPredicate, @Nullable LivingEntity entity, double x, double y, double z, Box box)
@Nullable default <T extends LivingEntity> T getClosestEntity(List<? extends T> entityList, TargetPredicate targetPredicate, @Nullable LivingEntity entity, double x, double y, double z)
default List<PlayerEntity> getPlayers(TargetPredicate targetPredicate, LivingEntity entity, Box box)
default <T extends LivingEntity> List<T> getTargets(Class<? extends T> entityClass, TargetPredicate targetPredicate, LivingEntity targetingEntity, Box box)
@Nullable default PlayerEntity getPlayerByUuid(UUID uuid)