类 EntityList
- java.lang.Object
-
- net.minecraft.world.EntityList
-
public class EntityList extends Object
A storage of entities that supports modification during iteration.The entities are stored by their network IDs.
- 另请参阅:
forEach(Consumer)- Mappings:
Namespace Name official cnhintermediary net/minecraft/class_5574named net/minecraft/world/EntityList
-
-
字段概要
字段 修饰符和类型 字段 说明 private Int2ObjectMap<Entity>entitiesprivate @Nullable Int2ObjectMap<Entity>iteratingprivate Int2ObjectMap<Entity>temp
-
构造器概要
构造器 构造器 说明 EntityList()
-
-
-
字段详细资料
-
entities
private Int2ObjectMap<Entity> entities
- Mappings:
Namespace Name Mixin selector official aLcnh;a:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;intermediary field_27254Lnet/minecraft/class_5574;field_27254:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;named entitiesLnet/minecraft/world/EntityList;entities:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;
-
temp
private Int2ObjectMap<Entity> temp
- Mappings:
Namespace Name Mixin selector official bLcnh;b:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;intermediary field_27255Lnet/minecraft/class_5574;field_27255:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;named tempLnet/minecraft/world/EntityList;temp:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;
-
iterating
@Nullable private @Nullable Int2ObjectMap<Entity> iterating
- Mappings:
Namespace Name Mixin selector official cLcnh;c:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;intermediary field_27256Lnet/minecraft/class_5574;field_27256:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;named iteratingLnet/minecraft/world/EntityList;iterating:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;
-
-
方法详细资料
-
ensureSafe
private void ensureSafe()
Ensures that the modifiedentitiesmap is not currently iterated. Ifentitiesis iterated, this moves its value totempso modification toentitiesis safe.- Mappings:
Namespace Name Mixin selector official aLcnh;a()Vintermediary method_31789Lnet/minecraft/class_5574;method_31789()Vnamed ensureSafeLnet/minecraft/world/EntityList;ensureSafe()V
-
add
public void add(Entity entity)
- Mappings:
Namespace Name Mixin selector official aLcnh;a(Lasl;)Vintermediary method_31790Lnet/minecraft/class_5574;method_31790(Lnet/minecraft/class_1297;)Vnamed addLnet/minecraft/world/EntityList;add(Lnet/minecraft/entity/Entity;)V
-
remove
public void remove(Entity entity)
- Mappings:
Namespace Name Mixin selector official bLcnh;b(Lasl;)Vintermediary method_31792Lnet/minecraft/class_5574;method_31792(Lnet/minecraft/class_1297;)Vnamed removeLnet/minecraft/world/EntityList;remove(Lnet/minecraft/entity/Entity;)V
-
has
public boolean has(Entity entity)
- Mappings:
Namespace Name Mixin selector official cLcnh;c(Lasl;)Zintermediary method_31793Lnet/minecraft/class_5574;method_31793(Lnet/minecraft/class_1297;)Znamed hasLnet/minecraft/world/EntityList;has(Lnet/minecraft/entity/Entity;)Z
-
forEach
public void forEach(Consumer<Entity> action)
Runs anactionon every entity in this storage.If this storage is updated during the iteration, the iteration will not be updated to reflect updated contents. For example, if an entity is added by the
action, theactionwon't run on that entity later.- 抛出:
UnsupportedOperationException- if this is called before an iteration has finished, such as within theactionor from another thread- Mappings:
Namespace Name Mixin selector official aLcnh;a(Ljava/util/function/Consumer;)Vintermediary method_31791Lnet/minecraft/class_5574;method_31791(Ljava/util/function/Consumer;)Vnamed forEachLnet/minecraft/world/EntityList;forEach(Ljava/util/function/Consumer;)V
-
-