Interface EntityView

All Known Subinterfaces:
class_5423, ServerWorldAccess, StructureWorldAccess, WorldAccess
All Known Implementing Classes:
ChunkRegion, ClientWorld, ServerWorld, World

public interface EntityView
  • Method Details

    • getOtherEntities

      List<Entity> getOtherEntities​(@Nullable Entity except, Box box, @Nullable Predicate<? super Entity> predicate)
      Computes a list of entities within some box, excluding the given entity, that satisfy the given predicate.
      Parameters:
      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
      predicate - a predicate which entities must satisfy in order to be included in the returned list.
      Returns:
      a list of entities within a box, excluding the given entity, all satisfying the given predicate
    • getEntitiesByClass

      <T extends Entity> List<T> getEntitiesByClass​(Class<? extends T> entityClass, Box box, @Nullable 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.
      Parameters:
      entityClass - the class the list of entities must extend
      box - the box in which to search for entities
      predicate - a predicate which entities must satisfy in order to be included in the returned list
      Returns:
      a list of entities within the box whose runtime class is a subclass of the given class
    • getEntitiesIncludingUngeneratedChunks

      default <T extends Entity> List<T> getEntitiesIncludingUngeneratedChunks​(Class<? extends T> entityClass, Box box, @Nullable Predicate<? super T> predicate)
    • getPlayers

      List<? extends PlayerEntity> getPlayers()
    • getOtherEntities

      default List<Entity> getOtherEntities​(@Nullable Entity except, Box box)
      Computes a list of entities within some box, excluding the given entity, that are not spectators.
      Parameters:
      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
      Returns:
      a list of entities within a box, excluding the given entity
      See Also:
      #getSurroundingEntities(Entity, Box, Predicate), Entity.isSpectator()
    • intersectsEntities

      default boolean intersectsEntities​(@Nullable Entity entity, VoxelShape shape)
    • getNonSpectatingEntities

      default <T extends Entity> List<T> getNonSpectatingEntities​(Class<? extends T> entityClass, Box box)
    • getEntitiesIncludingUngeneratedChunks

      default <T extends Entity> List<T> getEntitiesIncludingUngeneratedChunks​(Class<? extends T> entityClass, Box box)
    • getEntityCollisions

      default Stream<VoxelShape> getEntityCollisions​(@Nullable Entity entity, Box box, Predicate<Entity> predicate)
    • getClosestPlayer

      @Nullable default PlayerEntity getClosestPlayer​(double x, double y, double z, double maxDistance, @Nullable Predicate<Entity> targetPredicate)
    • getClosestPlayer

      @Nullable default PlayerEntity getClosestPlayer​(Entity entity, double maxDistance)
    • getClosestPlayer

      @Nullable default PlayerEntity getClosestPlayer​(double x, double y, double z, double maxDistance, boolean ignoreCreative)
    • isPlayerInRange

      default boolean isPlayerInRange​(double x, double y, double z, double range)
    • getClosestPlayer

      @Nullable default PlayerEntity getClosestPlayer​(TargetPredicate targetPredicate, LivingEntity entity)
    • getClosestPlayer

      @Nullable default PlayerEntity getClosestPlayer​(TargetPredicate targetPredicate, LivingEntity entity, double x, double y, double z)
    • getClosestPlayer

      @Nullable default PlayerEntity getClosestPlayer​(TargetPredicate targetPredicate, double x, double y, double z)
    • getClosestEntity

      @Nullable default <T extends LivingEntity> T getClosestEntity​(Class<? extends T> entityClass, TargetPredicate targetPredicate, @Nullable LivingEntity entity, double x, double y, double z, Box box)
    • getClosestEntityIncludingUngeneratedChunks

      @Nullable default <T extends LivingEntity> T getClosestEntityIncludingUngeneratedChunks​(Class<? extends T> entityClass, TargetPredicate targetPredicate, @Nullable LivingEntity entity, double x, double y, double z, Box box)
    • getClosestEntity

      @Nullable default <T extends LivingEntity> T getClosestEntity​(List<? extends T> entityList, TargetPredicate targetPredicate, @Nullable LivingEntity entity, double x, double y, double z)
    • getPlayers

      default List<PlayerEntity> getPlayers​(TargetPredicate targetPredicate, LivingEntity entity, Box box)
    • getTargets

      default <T extends LivingEntity> List<T> getTargets​(Class<? extends T> entityClass, TargetPredicate targetPredicate, LivingEntity targetingEntity, Box box)
    • getPlayerByUuid

      @Nullable default PlayerEntity getPlayerByUuid​(UUID uuid)