Package net.minecraft.world.entity
Class SimpleEntityLookup<T extends EntityLike>
java.lang.Object
net.minecraft.world.entity.SimpleEntityLookup<T>
- Type Parameters:
T- the type of indexed entity
- All Implemented Interfaces:
EntityLookup<T>
An implementation of entity lookup backed by two separate
EntityIndex and SectionedEntityCache.
It's up to the user to ensure that the index and the cache are consistent with each other.
- Mappings:
Namespace Name official dfzintermediary net/minecraft/class_5578named net/minecraft/world/entity/SimpleEntityLookup
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SectionedEntityCache<T>private final EntityIndex<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<U extends T>
voidforEach(TypeFilter<T, U> filter, LazyIterationConsumer<U> consumer) Performs anactionon each entity of typeUwithin this lookup.voidforEachIntersects(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, 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.
-
Field Details
-
index
- Mappings:
Namespace Name Mixin selector official aLdfz;a:Ldfr;intermediary field_27258Lnet/minecraft/class_5578;field_27258:Lnet/minecraft/class_5570;named indexLnet/minecraft/world/entity/SimpleEntityLookup;index:Lnet/minecraft/world/entity/EntityIndex;
-
cache
- Mappings:
Namespace Name Mixin selector official bLdfz;b:Ldfu;intermediary field_27259Lnet/minecraft/class_5578;field_27259:Lnet/minecraft/class_5573;named cacheLnet/minecraft/world/entity/SimpleEntityLookup;cache:Lnet/minecraft/world/entity/SectionedEntityCache;
-
-
Constructor Details
-
SimpleEntityLookup
- Mappings:
Namespace Name Mixin selector official <init>Ldfz;<init>(Ldfr;Ldfu;)Vintermediary <init>Lnet/minecraft/class_5578;<init>(Lnet/minecraft/class_5570;Lnet/minecraft/class_5573;)Vnamed <init>Lnet/minecraft/world/entity/SimpleEntityLookup;<init>(Lnet/minecraft/world/entity/EntityIndex;Lnet/minecraft/world/entity/SectionedEntityCache;)V
-
-
Method Details
-
get
Returns an entity by its network ID, ornullif none is found.- Specified by:
getin interfaceEntityLookup<T extends EntityLike>- Mappings:
Namespace Name Mixin selector official aLdfy;a(I)Ldfp;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.- Specified by:
getin interfaceEntityLookup<T extends EntityLike>- Mappings:
Namespace Name Mixin selector official aLdfy;a(Ljava/util/UUID;)Ldfp;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.- Specified by:
iteratein interfaceEntityLookup<T extends EntityLike>- Mappings:
Namespace Name Mixin selector official aLdfy;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.- Specified by:
forEachin interfaceEntityLookup<T extends EntityLike>- 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 official aLdfy;a(Ldfw;Lanr;)Vintermediary method_31806Lnet/minecraft/class_5577;method_31806(Lnet/minecraft/class_5575;Lnet/minecraft/class_7927;)Vnamed forEachLnet/minecraft/world/entity/EntityLookup;forEach(Lnet/minecraft/util/TypeFilter;Lnet/minecraft/util/function/LazyIterationConsumer;)V
-
forEachIntersects
- Specified by:
forEachIntersectsin interfaceEntityLookup<T extends EntityLike>- Mappings:
Namespace Name Mixin selector official aLdfy;a(Ledv;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
public <U extends T> void forEachIntersects(TypeFilter<T, U> filter, Box box, LazyIterationConsumer<U> consumer) - Specified by:
forEachIntersectsin interfaceEntityLookup<T extends EntityLike>- Mappings:
Namespace Name Mixin selector official aLdfy;a(Ldfw;Ledv;Lanr;)Vintermediary method_31805Lnet/minecraft/class_5577;method_31805(Lnet/minecraft/class_5575;Lnet/minecraft/class_238;Lnet/minecraft/class_7927;)Vnamed forEachIntersectsLnet/minecraft/world/entity/EntityLookup;forEachIntersects(Lnet/minecraft/util/TypeFilter;Lnet/minecraft/util/math/Box;Lnet/minecraft/util/function/LazyIterationConsumer;)V
-