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 named net/minecraft/world/entity/EntityLookup
intermediary net/minecraft/class_5577
official ecg
-
Method Summary
Modifier and TypeMethodDescription<U extends T>
voidforEach
(TypeFilter<T, U> filter, LazyIterationConsumer<U> consumer) Performs anaction
on each entity of typeU
within this lookup.void
forEachIntersects
(Box box, Consumer<T> action) <U extends T>
voidforEachIntersects
(TypeFilter<T, U> filter, Box box, LazyIterationConsumer<U> consumer) get
(int id) Returns an entity by its network ID, ornull
if none is found.Returns an entity by its UUID, ornull
if none is found.iterate()
Returns an unmodifiable iterable over all entities in this lookup.
-
Method Details
-
get
Returns an entity by its network ID, ornull
if none is found.- Mappings:
Namespace Name Mixin selector named get
Lnet/minecraft/world/entity/EntityLookup;get(I)Lnet/minecraft/world/entity/EntityLike;
intermediary method_31804
Lnet/minecraft/class_5577;method_31804(I)Lnet/minecraft/class_5568;
official a
Lecg;a(I)Lebx;
-
get
Returns an entity by its UUID, ornull
if none is found.- Mappings:
Namespace Name Mixin selector named get
Lnet/minecraft/world/entity/EntityLookup;get(Ljava/util/UUID;)Lnet/minecraft/world/entity/EntityLike;
intermediary method_31808
Lnet/minecraft/class_5577;method_31808(Ljava/util/UUID;)Lnet/minecraft/class_5568;
official a
Lecg;a(Ljava/util/UUID;)Lebx;
-
iterate
Returns an unmodifiable iterable over all entities in this lookup.- Mappings:
Namespace Name Mixin selector named iterate
Lnet/minecraft/world/entity/EntityLookup;iterate()Ljava/lang/Iterable;
intermediary method_31803
Lnet/minecraft/class_5577;method_31803()Ljava/lang/Iterable;
official a
Lecg;a()Ljava/lang/Iterable;
-
forEach
Performs anaction
on each entity of typeU
within this lookup.- Type Parameters:
U
- the type of entity to perform action on- Parameters:
filter
- specifies the desired type of entityconsumer
- the consumer, additionally checking whether to perform the next iteration or to stop early- Mappings:
Namespace Name Mixin selector named forEach
Lnet/minecraft/world/entity/EntityLookup;forEach(Lnet/minecraft/util/TypeFilter;Lnet/minecraft/util/function/LazyIterationConsumer;)V
intermediary method_31806
Lnet/minecraft/class_5577;method_31806(Lnet/minecraft/class_5575;Lnet/minecraft/class_7927;)V
official a
Lecg;a(Lece;Layq;)V
-
forEachIntersects
- Mappings:
Namespace Name Mixin selector named forEachIntersects
Lnet/minecraft/world/entity/EntityLookup;forEachIntersects(Lnet/minecraft/util/math/Box;Ljava/util/function/Consumer;)V
intermediary method_31807
Lnet/minecraft/class_5577;method_31807(Lnet/minecraft/class_238;Ljava/util/function/Consumer;)V
official a
Lecg;a(Lfbs;Ljava/util/function/Consumer;)V
-
forEachIntersects
<U extends T> void forEachIntersects(TypeFilter<T, U> filter, Box box, LazyIterationConsumer<U> consumer) - Mappings:
Namespace Name Mixin selector named forEachIntersects
Lnet/minecraft/world/entity/EntityLookup;forEachIntersects(Lnet/minecraft/util/TypeFilter;Lnet/minecraft/util/math/Box;Lnet/minecraft/util/function/LazyIterationConsumer;)V
intermediary method_31805
Lnet/minecraft/class_5577;method_31805(Lnet/minecraft/class_5575;Lnet/minecraft/class_238;Lnet/minecraft/class_7927;)V
official a
Lecg;a(Lece;Lfbs;Layq;)V
-