Package net.minecraft.world.entity
Interface EntityLookup<T extends EntityLike>
- Type Parameters:
T- the type of indexed entity
- All Known Implementing Classes:
SimpleEntityLookup
public interface EntityLookup<T extends EntityLike>
An interface for looking up entities.
It supports iteration, accessing by ID, or by intersection with boxes.
- Mappings:
Namespace Name official colintermediary net/minecraft/class_5577named net/minecraft/world/entity/EntityLookup
-
Method Summary
Modifier and TypeMethodDescription<U extends T>
voidforEach(TypeFilter<T,U> filter, Consumer<U> action)Performs anactionon each entity of typeUwithin this lookup.voidforEachIntersects(Box box, Consumer<T> action)<U extends T>
voidforEachIntersects(TypeFilter<T,U> filter, Box box, Consumer<U> action)get(int id)Returns an entity by its network ID, ornullif none is found.Returns an entity by its UUID, ornullif none is found.iterate()Returns an unmodifiable iterable over all entities in this lookup.
-
Method Details
-
get
Returns an entity by its network ID, ornullif none is found.- Mappings:
Namespace Name Mixin selector official aLcol;a(I)Lcoc;intermediary method_31804Lnet/minecraft/class_5577;method_31804(I)Lnet/minecraft/class_5568;named getLnet/minecraft/world/entity/EntityLookup;get(I)Lnet/minecraft/world/entity/EntityLike;
-
get
Returns an entity by its UUID, ornullif none is found.- Mappings:
Namespace Name Mixin selector official aLcol;a(Ljava/util/UUID;)Lcoc;intermediary method_31808Lnet/minecraft/class_5577;method_31808(Ljava/util/UUID;)Lnet/minecraft/class_5568;named getLnet/minecraft/world/entity/EntityLookup;get(Ljava/util/UUID;)Lnet/minecraft/world/entity/EntityLike;
-
iterate
Returns an unmodifiable iterable over all entities in this lookup.- Mappings:
Namespace Name Mixin selector official aLcol;a()Ljava/lang/Iterable;intermediary method_31803Lnet/minecraft/class_5577;method_31803()Ljava/lang/Iterable;named iterateLnet/minecraft/world/entity/EntityLookup;iterate()Ljava/lang/Iterable;
-
forEach
Performs anactionon each entity of typeUwithin this lookup.- Type Parameters:
U- the type of entity to perform action on- Parameters:
filter- specifies the desired type of entityaction- the action to perform- Mappings:
Namespace Name Mixin selector official aLcol;a(Lcoj;Ljava/util/function/Consumer;)Vintermediary method_31806Lnet/minecraft/class_5577;method_31806(Lnet/minecraft/class_5575;Ljava/util/function/Consumer;)Vnamed forEachLnet/minecraft/world/entity/EntityLookup;forEach(Lnet/minecraft/util/TypeFilter;Ljava/util/function/Consumer;)V
-
forEachIntersects
- Mappings:
Namespace Name Mixin selector official aLcol;a(Ldmv;Ljava/util/function/Consumer;)Vintermediary method_31807Lnet/minecraft/class_5577;method_31807(Lnet/minecraft/class_238;Ljava/util/function/Consumer;)Vnamed forEachIntersectsLnet/minecraft/world/entity/EntityLookup;forEachIntersects(Lnet/minecraft/util/math/Box;Ljava/util/function/Consumer;)V
-
forEachIntersects
- Mappings:
Namespace Name Mixin selector official aLcol;a(Lcoj;Ldmv;Ljava/util/function/Consumer;)Vintermediary method_31805Lnet/minecraft/class_5577;method_31805(Lnet/minecraft/class_5575;Lnet/minecraft/class_238;Ljava/util/function/Consumer;)Vnamed forEachIntersectsLnet/minecraft/world/entity/EntityLookup;forEachIntersects(Lnet/minecraft/util/TypeFilter;Lnet/minecraft/util/math/Box;Ljava/util/function/Consumer;)V
-