Package net.minecraft.world.level
Interface EntityGetter
- All Known Subinterfaces:
CommonLevelAccessor
,LevelAccessor
,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> pClazz, AABB pArea, Predicate<? super T> pFilter) default List
<VoxelShape> getEntityCollisions
(Entity pEntity, AABB pCollisionBox) default <T extends LivingEntity>
List<T> getNearbyEntities
(Class<T> pEntityClazz, TargetingConditions pEntityPredicate, LivingEntity pEntity, AABB pArea) getNearbyPlayers
(TargetingConditions pPredicate, LivingEntity pTarget, AABB pArea) default <T extends LivingEntity>
TgetNearestEntity
(Class<? extends T> pEntityClazz, TargetingConditions pConditions, LivingEntity pTarget, double pX, double pY, double pZ, AABB pBoundingBox) default <T extends LivingEntity>
TgetNearestEntity
(List<? extends T> pEntities, TargetingConditions pPredicate, LivingEntity pTarget, double pX, double pY, double pZ) default Player
getNearestPlayer
(double pX, double pY, double pZ, double pDistance, boolean pCreativePlayers) default Player
getNearestPlayer
(double pX, double pY, double pZ, double pDistance, Predicate<Entity> pPredicate) default Player
getNearestPlayer
(TargetingConditions pPredicate, double pX, double pY, double pZ) default Player
getNearestPlayer
(TargetingConditions pPredicate, LivingEntity pTarget) default Player
getNearestPlayer
(TargetingConditions pPredicate, LivingEntity pTarget, double pX, double pY, double pZ) default Player
getNearestPlayer
(Entity pEntity, double pDistance) default Player
getPlayerByUUID
(UUID pUniqueId) default boolean
hasNearbyAlivePlayer
(double pX, double pY, double pZ, double pDistance) default boolean
isUnobstructed
(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) -
getNearestPlayer
-
getNearestPlayer
@Nullable default Player getNearestPlayer(TargetingConditions pPredicate, LivingEntity pTarget, double pX, double pY, double pZ) -
getNearestPlayer
@Nullable default Player getNearestPlayer(TargetingConditions pPredicate, double pX, double pY, double pZ) -
getNearestEntity
@Nullable default <T extends LivingEntity> T getNearestEntity(Class<? extends T> pEntityClazz, TargetingConditions pConditions, @Nullable LivingEntity pTarget, double pX, double pY, double pZ, AABB pBoundingBox) -
getNearestEntity
@Nullable default <T extends LivingEntity> T getNearestEntity(List<? extends T> pEntities, TargetingConditions pPredicate, @Nullable LivingEntity pTarget, double pX, double pY, double pZ) -
getNearbyPlayers
default List<Player> getNearbyPlayers(TargetingConditions pPredicate, LivingEntity pTarget, AABB pArea) -
getNearbyEntities
default <T extends LivingEntity> List<T> getNearbyEntities(Class<T> pEntityClazz, TargetingConditions pEntityPredicate, LivingEntity pEntity, AABB pArea) -
getPlayerByUUID
-