Package net.minecraft.world
Interface EntityView
- All Known Subinterfaces:
EntityLookupView,RegistryWorldView,ServerWorldAccess,StructureWorldAccess,WorldAccess
- All Known Implementing Classes:
ChunkRegion,ClientWorld,ServerWorld,World
public interface EntityView
- Mappings:
Namespace Name named net/minecraft/world/EntityViewintermediary net/minecraft/class_1924official dkb
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleandoesNotIntersectEntities(@Nullable Entity except, VoxelShape shape) Returnstrueifshapedoes not intersect with non-spectator entities exceptexcept.default @Nullable PlayerEntitygetClosestPlayer(double x, double y, double z, double maxDistance, boolean ignoreCreative) default @Nullable PlayerEntitygetClosestPlayer(double x, double y, double z, double maxDistance, @Nullable Predicate<Entity> targetPredicate) default @Nullable PlayerEntitygetClosestPlayer(Entity entity, double maxDistance) getEntitiesByClass(Class<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.getEntitiesByType(TypeFilter<Entity, T> filter, Box box, Predicate<? super T> predicate) default List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box box) getNonSpectatingEntities(Class<T> entityClass, Box box) getOtherEntities(@Nullable Entity except, Box box) Computes a list of entities within some box, excluding the given entity, that are not spectators.Computes a list of entities within some box, excluding the given entity, that satisfy the given predicate.default @Nullable PlayerEntitygetPlayerByUuid(UUID uuid) List<? extends PlayerEntity> default booleanisPlayerInRange(double x, double y, double z, double range)
-
Method Details
-
getOtherEntities
List<Entity> getOtherEntities(@Nullable @Nullable 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.- Parameters:
except- the entity the box logically surrounds; this entity is ignored if it is inside the boxbox- the box in which to search for entitiespredicate- 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
- Mappings:
Namespace Name Mixin selector named getOtherEntitiesLnet/minecraft/world/EntityView;getOtherEntities(Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Box;Ljava/util/function/Predicate;)Ljava/util/List;intermediary method_8333Lnet/minecraft/class_1924;method_8333(Lnet/minecraft/class_1297;Lnet/minecraft/class_238;Ljava/util/function/Predicate;)Ljava/util/List;official aLdkb;a(Lbxe;Lffx;Ljava/util/function/Predicate;)Ljava/util/List;
-
getEntitiesByType
<T extends Entity> List<T> getEntitiesByType(TypeFilter<Entity, T> filter, Box box, Predicate<? super T> predicate) - Mappings:
Namespace Name Mixin selector named getEntitiesByTypeLnet/minecraft/world/EntityView;getEntitiesByType(Lnet/minecraft/util/TypeFilter;Lnet/minecraft/util/math/Box;Ljava/util/function/Predicate;)Ljava/util/List;intermediary method_18023Lnet/minecraft/class_1924;method_18023(Lnet/minecraft/class_5575;Lnet/minecraft/class_238;Ljava/util/function/Predicate;)Ljava/util/List;official aLdkb;a(Legc;Lffx;Ljava/util/function/Predicate;)Ljava/util/List;
-
getEntitiesByClass
default <T extends Entity> List<T> getEntitiesByClass(Class<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.- Parameters:
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 list- Returns:
- a list of entities within the box whose runtime class is a subclass of the given class
- Mappings:
Namespace Name Mixin selector named getEntitiesByClassLnet/minecraft/world/EntityView;getEntitiesByClass(Ljava/lang/Class;Lnet/minecraft/util/math/Box;Ljava/util/function/Predicate;)Ljava/util/List;intermediary method_8390Lnet/minecraft/class_1924;method_8390(Ljava/lang/Class;Lnet/minecraft/class_238;Ljava/util/function/Predicate;)Ljava/util/List;official aLdkb;a(Ljava/lang/Class;Lffx;Ljava/util/function/Predicate;)Ljava/util/List;
-
getPlayers
List<? extends PlayerEntity> getPlayers()- Mappings:
Namespace Name Mixin selector named getPlayersLnet/minecraft/world/EntityView;getPlayers()Ljava/util/List;intermediary method_18456Lnet/minecraft/class_1924;method_18456()Ljava/util/List;official zLdkb;z()Ljava/util/List;
-
getOtherEntities
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 boxbox- the box in which to search for entities- Returns:
- a list of entities within a box, excluding the given entity
- See Also:
- Mappings:
Namespace Name Mixin selector named getOtherEntitiesLnet/minecraft/world/EntityView;getOtherEntities(Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Box;)Ljava/util/List;intermediary method_8335Lnet/minecraft/class_1924;method_8335(Lnet/minecraft/class_1297;Lnet/minecraft/class_238;)Ljava/util/List;official a_Ldkb;a_(Lbxe;Lffx;)Ljava/util/List;
-
doesNotIntersectEntities
Returnstrueifshapedoes not intersect with non-spectator entities exceptexcept.- Returns:
trueifshapedoes not intersect with non-spectator entities exceptexcept- Implementation Note:
- This always returns
trueifshapeis empty. - Mappings:
Namespace Name Mixin selector named doesNotIntersectEntitiesLnet/minecraft/world/EntityView;doesNotIntersectEntities(Lnet/minecraft/entity/Entity;Lnet/minecraft/util/shape/VoxelShape;)Zintermediary method_8611Lnet/minecraft/class_1924;method_8611(Lnet/minecraft/class_1297;Lnet/minecraft/class_265;)Zofficial aLdkb;a(Lbxe;Lfgw;)Z
-
getNonSpectatingEntities
- Mappings:
Namespace Name Mixin selector named getNonSpectatingEntitiesLnet/minecraft/world/EntityView;getNonSpectatingEntities(Ljava/lang/Class;Lnet/minecraft/util/math/Box;)Ljava/util/List;intermediary method_18467Lnet/minecraft/class_1924;method_18467(Ljava/lang/Class;Lnet/minecraft/class_238;)Ljava/util/List;official aLdkb;a(Ljava/lang/Class;Lffx;)Ljava/util/List;
-
getEntityCollisions
- Mappings:
Namespace Name Mixin selector named getEntityCollisionsLnet/minecraft/world/EntityView;getEntityCollisions(Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Box;)Ljava/util/List;intermediary method_20743Lnet/minecraft/class_1924;method_20743(Lnet/minecraft/class_1297;Lnet/minecraft/class_238;)Ljava/util/List;official cLdkb;c(Lbxe;Lffx;)Ljava/util/List;
-
getClosestPlayer
@Nullable default @Nullable PlayerEntity getClosestPlayer(double x, double y, double z, double maxDistance, @Nullable @Nullable Predicate<Entity> targetPredicate) - Mappings:
Namespace Name Mixin selector named getClosestPlayerLnet/minecraft/world/EntityView;getClosestPlayer(DDDDLjava/util/function/Predicate;)Lnet/minecraft/entity/player/PlayerEntity;intermediary method_8604Lnet/minecraft/class_1924;method_8604(DDDDLjava/util/function/Predicate;)Lnet/minecraft/class_1657;official aLdkb;a(DDDDLjava/util/function/Predicate;)Lcsi;
-
getClosestPlayer
- Mappings:
Namespace Name Mixin selector named getClosestPlayerLnet/minecraft/world/EntityView;getClosestPlayer(Lnet/minecraft/entity/Entity;D)Lnet/minecraft/entity/player/PlayerEntity;intermediary method_18460Lnet/minecraft/class_1924;method_18460(Lnet/minecraft/class_1297;D)Lnet/minecraft/class_1657;official aLdkb;a(Lbxe;D)Lcsi;
-
getClosestPlayer
@Nullable default @Nullable PlayerEntity getClosestPlayer(double x, double y, double z, double maxDistance, boolean ignoreCreative) - Mappings:
Namespace Name Mixin selector named getClosestPlayerLnet/minecraft/world/EntityView;getClosestPlayer(DDDDZ)Lnet/minecraft/entity/player/PlayerEntity;intermediary method_18459Lnet/minecraft/class_1924;method_18459(DDDDZ)Lnet/minecraft/class_1657;official aLdkb;a(DDDDZ)Lcsi;
-
isPlayerInRange
default boolean isPlayerInRange(double x, double y, double z, double range) - Mappings:
Namespace Name Mixin selector named isPlayerInRangeLnet/minecraft/world/EntityView;isPlayerInRange(DDDD)Zintermediary method_18458Lnet/minecraft/class_1924;method_18458(DDDD)Zofficial aLdkb;a(DDDD)Z
-
getPlayerByUuid
- Mappings:
Namespace Name Mixin selector named getPlayerByUuidLnet/minecraft/world/EntityView;getPlayerByUuid(Ljava/util/UUID;)Lnet/minecraft/entity/player/PlayerEntity;intermediary method_18470Lnet/minecraft/class_1924;method_18470(Ljava/util/UUID;)Lnet/minecraft/class_1657;official aLdkb;a(Ljava/util/UUID;)Lcsi;
-