Package net.minecraft.world.level
Interface EntityGetter
- All Known Subinterfaces:
CommonLevelAccessor,LevelAccessor,ServerEntityGetter,ServerLevelAccessor,WorldGenLevel
- All Known Implementing Classes:
ClientLevel,Level,ServerLevel,WorldGenRegion
public interface EntityGetter
-
Method Summary
Modifier and TypeMethodDescriptiongetEntities(Entity pEntity, AABB pArea) Will get all entities within the specified AABB excluding the one passed into it.getEntities(Entity pEntity, AABB pArea, Predicate<? super Entity> pPredicate) Gets all entities within the specified AABB excluding the one passed into it.getEntities(EntityTypeTest<Entity, T> pEntityTypeTest, AABB pBounds, Predicate<? super T> pPredicate) getEntitiesOfClass(Class<T> pEntityClass, AABB pArea) getEntitiesOfClass(Class<T> pEntityClass, AABB pArea, Predicate<? super T> pFilter) default List<VoxelShape> getEntityCollisions(Entity pEntity, AABB pCollisionBox) default PlayergetNearestPlayer(double pX, double pY, double pZ, double pDistance, boolean pCreativePlayers) default PlayergetNearestPlayer(double pX, double pY, double pZ, double pDistance, Predicate<Entity> pPredicate) default PlayergetNearestPlayer(Entity pEntity, double pDistance) default PlayergetPlayerByUUID(UUID pUniqueId) default booleanhasNearbyAlivePlayer(double pX, double pY, double pZ, double pDistance) default booleanisUnobstructed(Entity pEntity, VoxelShape pShape) players()
-
Method Details
-
getEntities
List<Entity> getEntities(@Nullable Entity pEntity, AABB pArea, Predicate<? super Entity> pPredicate) Gets all entities within the specified AABB excluding the one passed into it. -
getEntities
-
getEntitiesOfClass
-
players
-
getEntities
Will get all entities within the specified AABB excluding the one passed into it. Args: entityToExclude, aabb -
isUnobstructed
-
getEntitiesOfClass
-
getEntityCollisions
-
getNearestPlayer
-
getNearestPlayer
-
getNearestPlayer
@Nullable default Player getNearestPlayer(double pX, double pY, double pZ, double pDistance, boolean pCreativePlayers) -
hasNearbyAlivePlayer
default boolean hasNearbyAlivePlayer(double pX, double pY, double pZ, double pDistance) -
getPlayerByUUID
-