类 SimpleEntityLookup<T extends EntityLike>
- java.lang.Object
-
- net.minecraft.world.entity.SimpleEntityLookup<T>
-
- 类型参数:
T- the type of indexed entity
- 所有已实现的接口:
EntityLookup<T>
public class SimpleEntityLookup<T extends EntityLike> extends Object implements EntityLookup<T>
An implementation of entity lookup backed by two separateEntityIndexandSectionedEntityCache.It's up to the user to ensure that the index and the cache are consistent with each other.
- Mappings:
Namespace Name official cnlintermediary net/minecraft/class_5578named net/minecraft/world/entity/SimpleEntityLookup
-
-
字段概要
字段 修饰符和类型 字段 说明 private SectionedEntityCache<T>cacheprivate EntityIndex<T>index
-
构造器概要
构造器 构造器 说明 SimpleEntityLookup(EntityIndex<T> index, SectionedEntityCache<T> cache)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 <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)Tget(int id)Returns an entity by its network ID, ornullif none is found.Tget(UUID uuid)Returns an entity by its UUID, ornullif none is found.Iterable<T>iterate()Returns an unmodifiable iterable over all entities in this lookup.
-
-
-
字段详细资料
-
index
private final EntityIndex<T extends EntityLike> index
- Mappings:
Namespace Name Mixin selector official aLcnl;a:Lcnd;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
private final SectionedEntityCache<T extends EntityLike> cache
- Mappings:
Namespace Name Mixin selector official bLcnl;b:Lcng;intermediary field_27259Lnet/minecraft/class_5578;field_27259:Lnet/minecraft/class_5573;named cacheLnet/minecraft/world/entity/SimpleEntityLookup;cache:Lnet/minecraft/world/entity/SectionedEntityCache;
-
-
构造器详细资料
-
SimpleEntityLookup
public SimpleEntityLookup(EntityIndex<T> index, SectionedEntityCache<T> cache)
- Mappings:
Namespace Name Mixin selector official <init>Lcnl;<init>(Lcnd;Lcng;)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
-
-
方法详细资料
-
get
@Nullable public T get(int id)
Returns an entity by its network ID, ornullif none is found.- 指定者:
get在接口中EntityLookup<T extends EntityLike>- Mappings:
Namespace Name Mixin selector official aLcnk;a(I)Lcnb;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
@Nullable public T get(UUID uuid)
Returns an entity by its UUID, ornullif none is found.- 指定者:
get在接口中EntityLookup<T extends EntityLike>- Mappings:
Namespace Name Mixin selector official aLcnk;a(Ljava/util/UUID;)Lcnb;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
public Iterable<T> iterate()
Returns an unmodifiable iterable over all entities in this lookup.- 指定者:
iterate在接口中EntityLookup<T extends EntityLike>- Mappings:
Namespace Name Mixin selector official aLcnk;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
public <U extends T> void forEach(TypeFilter<T,U> filter, Consumer<U> action)
Performs anactionon each entity of typeUwithin this lookup.- 指定者:
forEach在接口中EntityLookup<T extends EntityLike>- 类型参数:
U- the type of entity to perform action on- 参数:
filter- specifies the desired type of entityaction- the action to perform- Mappings:
Namespace Name Mixin selector official aLcnk;a(Lcni;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
public void forEachIntersects(Box box, Consumer<T> action)
- 指定者:
forEachIntersects在接口中EntityLookup<T extends EntityLike>- Mappings:
Namespace Name Mixin selector official aLcnk;a(Ldlv;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, Consumer<U> action)
- 指定者:
forEachIntersects在接口中EntityLookup<T extends EntityLike>- Mappings:
Namespace Name Mixin selector official aLcnk;a(Lcni;Ldlv;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
-
-