类 ServerEntityManager<T extends EntityLike>
- java.lang.Object
-
- net.minecraft.server.world.ServerEntityManager<T>
-
- 所有已实现的接口:
AutoCloseable
public class ServerEntityManager<T extends EntityLike> extends Object implements AutoCloseable
An entity manager for a server environment.- Mappings:
Namespace Name official cnmintermediary net/minecraft/class_5579named net/minecraft/server/world/ServerEntityManager
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 (专用程序包) classServerEntityManager.Listener(专用程序包) static classServerEntityManager.StatusThe status of chunks within a server entity manager.
-
字段概要
字段 修饰符和类型 字段 说明 private SectionedEntityCache<T>cacheprivate ChunkDataAccess<T>dataAccessprivate Set<UUID>entityUuidsprivate EntityHandler<T>handlerprivate EntityIndex<T>indexprivate Queue<ChunkDataList<T>>loadingQueueprivate static LoggerLOGGERprivate EntityLookup<T>lookupprivate Long2ObjectMap<ServerEntityManager.Status>managedStatusesprivate LongSetpendingUnloadsprivate Long2ObjectMap<EntityTrackingStatus>trackingStatuses
-
构造器概要
构造器 构造器 说明 ServerEntityManager(Class<T> entityClass, EntityHandler<T> handler, ChunkDataAccess<T> dataAccess)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddEntities(Stream<T> entities)Adds a few newly created entities to this manager.booleanaddEntity(T entity)Adds a newly created entity to this manager.private booleanaddEntity(T entity, boolean existing)Loads or adds an entity to this manager.private booleanaddEntityUuid(T entity)voidclose()voiddump(Writer writer)private voidentityLeftSection(long sectionPos, EntityTrackingSection<T> section)voidflush()StringgetDebugString()private LongSetgetLoadedChunks()EntityLookup<T>getLookup()private static <T extends EntityLike>
EntityTrackingStatusgetNeededLoadStatus(T entity, EntityTrackingStatus current)booleanhas(UUID uuid)private voidloadChunks()voidloadEntities(Stream<T> entities)Loads a few entities from disk to this manager.private voidreadIfFresh(long chunkPos)voidsave()private voidscheduleRead(long chunkPos)private voidstartTicking(T entity)private voidstartTracking(T entity)private voidstopTicking(T entity)private voidstopTracking(T entity)voidtick()private booleantrySave(long chunkPos, Consumer<T> action)Tries to save entities in a chunk and performs anactionon each saved entity if successful.private booleanunload(long chunkPos)private voidunload(EntityLike entity)private voidunloadChunks()voidupdateTrackingStatus(ChunkPos chunkPos, ChunkHolder.LevelType levelType)Updates the tracking status of tracking sections in a chunk atchunkPosgiven thelevelType.voidupdateTrackingStatus(ChunkPos chunkPos, EntityTrackingStatus trackingStatus)Updates thetrackingStatusof tracking sections in a chunk atchunkPos.
-
-
-
字段详细资料
-
LOGGER
private static final Logger LOGGER
- Mappings:
Namespace Name Mixin selector official aLcnm;a:Lorg/apache/logging/log4j/Logger;intermediary field_27260Lnet/minecraft/class_5579;field_27260:Lorg/apache/logging/log4j/Logger;named LOGGERLnet/minecraft/server/world/ServerEntityManager;LOGGER:Lorg/apache/logging/log4j/Logger;
-
entityUuids
private final Set<UUID> entityUuids
- Mappings:
Namespace Name Mixin selector official bLcnm;b:Ljava/util/Set;intermediary field_27261Lnet/minecraft/class_5579;field_27261:Ljava/util/Set;named entityUuidsLnet/minecraft/server/world/ServerEntityManager;entityUuids:Ljava/util/Set;
-
handler
private final EntityHandler<T extends EntityLike> handler
- Mappings:
Namespace Name Mixin selector official cLcnm;c:Lcnj;intermediary field_27262Lnet/minecraft/class_5579;field_27262:Lnet/minecraft/class_5576;named handlerLnet/minecraft/server/world/ServerEntityManager;handler:Lnet/minecraft/world/entity/EntityHandler;
-
dataAccess
private final ChunkDataAccess<T extends EntityLike> dataAccess
- Mappings:
Namespace Name Mixin selector official dLcnm;d:Lcne;intermediary field_27263Lnet/minecraft/class_5579;field_27263:Lnet/minecraft/class_5571;named dataAccessLnet/minecraft/server/world/ServerEntityManager;dataAccess:Lnet/minecraft/world/storage/ChunkDataAccess;
-
index
private final EntityIndex<T extends EntityLike> index
- Mappings:
Namespace Name Mixin selector official eLcnm;e:Lcnd;intermediary field_27264Lnet/minecraft/class_5579;field_27264:Lnet/minecraft/class_5570;named indexLnet/minecraft/server/world/ServerEntityManager;index:Lnet/minecraft/world/entity/EntityIndex;
-
cache
private final SectionedEntityCache<T extends EntityLike> cache
- Mappings:
Namespace Name Mixin selector official fLcnm;f:Lcng;intermediary field_27265Lnet/minecraft/class_5579;field_27265:Lnet/minecraft/class_5573;named cacheLnet/minecraft/server/world/ServerEntityManager;cache:Lnet/minecraft/world/entity/SectionedEntityCache;
-
lookup
private final EntityLookup<T extends EntityLike> lookup
- Mappings:
Namespace Name Mixin selector official gLcnm;g:Lcnk;intermediary field_27266Lnet/minecraft/class_5579;field_27266:Lnet/minecraft/class_5577;named lookupLnet/minecraft/server/world/ServerEntityManager;lookup:Lnet/minecraft/world/entity/EntityLookup;
-
trackingStatuses
private final Long2ObjectMap<EntityTrackingStatus> trackingStatuses
- Mappings:
Namespace Name Mixin selector official hLcnm;h:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;intermediary field_27267Lnet/minecraft/class_5579;field_27267:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;named trackingStatusesLnet/minecraft/server/world/ServerEntityManager;trackingStatuses:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
-
managedStatuses
private final Long2ObjectMap<ServerEntityManager.Status> managedStatuses
- Mappings:
Namespace Name Mixin selector official iLcnm;i:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;intermediary field_27268Lnet/minecraft/class_5579;field_27268:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;named managedStatusesLnet/minecraft/server/world/ServerEntityManager;managedStatuses:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
-
pendingUnloads
private final LongSet pendingUnloads
- Mappings:
Namespace Name Mixin selector official jLcnm;j:Lit/unimi/dsi/fastutil/longs/LongSet;intermediary field_27269Lnet/minecraft/class_5579;field_27269:Lit/unimi/dsi/fastutil/longs/LongSet;named pendingUnloadsLnet/minecraft/server/world/ServerEntityManager;pendingUnloads:Lit/unimi/dsi/fastutil/longs/LongSet;
-
loadingQueue
private final Queue<ChunkDataList<T extends EntityLike>> loadingQueue
- Mappings:
Namespace Name Mixin selector official kLcnm;k:Ljava/util/Queue;intermediary field_27270Lnet/minecraft/class_5579;field_27270:Ljava/util/Queue;named loadingQueueLnet/minecraft/server/world/ServerEntityManager;loadingQueue:Ljava/util/Queue;
-
-
构造器详细资料
-
ServerEntityManager
public ServerEntityManager(Class<T> entityClass, EntityHandler<T> handler, ChunkDataAccess<T> dataAccess)
- Mappings:
Namespace Name Mixin selector official <init>Lcnm;<init>(Ljava/lang/Class;Lcnj;Lcne;)Vintermediary <init>Lnet/minecraft/class_5579;<init>(Ljava/lang/Class;Lnet/minecraft/class_5576;Lnet/minecraft/class_5571;)Vnamed <init>Lnet/minecraft/server/world/ServerEntityManager;<init>(Ljava/lang/Class;Lnet/minecraft/world/entity/EntityHandler;Lnet/minecraft/world/storage/ChunkDataAccess;)V
-
-
方法详细资料
-
entityLeftSection
private void entityLeftSection(long sectionPos, EntityTrackingSection<T> section)- Mappings:
Namespace Name Mixin selector official aLcnm;a(JLcnf;)Vintermediary method_31811Lnet/minecraft/class_5579;method_31811(JLnet/minecraft/class_5572;)Vnamed entityLeftSectionLnet/minecraft/server/world/ServerEntityManager;entityLeftSection(JLnet/minecraft/world/entity/EntityTrackingSection;)V
-
addEntityUuid
private boolean addEntityUuid(T entity)
- Mappings:
Namespace Name Mixin selector official bLcnm;b(Lcnb;)Zintermediary method_31831Lnet/minecraft/class_5579;method_31831(Lnet/minecraft/class_5568;)Znamed addEntityUuidLnet/minecraft/server/world/ServerEntityManager;addEntityUuid(Lnet/minecraft/world/entity/EntityLike;)Z
-
addEntity
public boolean addEntity(T entity)
Adds a newly created entity to this manager.- 参数:
entity- the newly created entity- 返回:
- if the entity was added
- Mappings:
Namespace Name Mixin selector official aLcnm;a(Lcnb;)Zintermediary method_31818Lnet/minecraft/class_5579;method_31818(Lnet/minecraft/class_5568;)Znamed addEntityLnet/minecraft/server/world/ServerEntityManager;addEntity(Lnet/minecraft/world/entity/EntityLike;)Z
-
addEntity
private boolean addEntity(T entity, boolean existing)
Loads or adds an entity to this manager.- 参数:
entity- the entityexisting- whether this entity is loaded from the map than created anew- 返回:
- if the entity was loaded or added
- Mappings:
Namespace Name Mixin selector official aLcnm;a(Lcnb;Z)Zintermediary method_31820Lnet/minecraft/class_5579;method_31820(Lnet/minecraft/class_5568;Z)Znamed addEntityLnet/minecraft/server/world/ServerEntityManager;addEntity(Lnet/minecraft/world/entity/EntityLike;Z)Z
-
getNeededLoadStatus
private static <T extends EntityLike> EntityTrackingStatus getNeededLoadStatus(T entity, EntityTrackingStatus current)
- Mappings:
Namespace Name Mixin selector official bLcnm;b(Lcnb;Lcno;)Lcno;intermediary method_31832Lnet/minecraft/class_5579;method_31832(Lnet/minecraft/class_5568;Lnet/minecraft/class_5584;)Lnet/minecraft/class_5584;named getNeededLoadStatusLnet/minecraft/server/world/ServerEntityManager;getNeededLoadStatus(Lnet/minecraft/world/entity/EntityLike;Lnet/minecraft/world/entity/EntityTrackingStatus;)Lnet/minecraft/world/entity/EntityTrackingStatus;
-
loadEntities
public void loadEntities(Stream<T> entities)
Loads a few entities from disk to this manager.- Mappings:
Namespace Name Mixin selector official aLcnm;a(Ljava/util/stream/Stream;)Vintermediary method_31828Lnet/minecraft/class_5579;method_31828(Ljava/util/stream/Stream;)Vnamed loadEntitiesLnet/minecraft/server/world/ServerEntityManager;loadEntities(Ljava/util/stream/Stream;)V
-
addEntities
public void addEntities(Stream<T> entities)
Adds a few newly created entities to this manager.- Mappings:
Namespace Name Mixin selector official bLcnm;b(Ljava/util/stream/Stream;)Vintermediary method_31835Lnet/minecraft/class_5579;method_31835(Ljava/util/stream/Stream;)Vnamed addEntitiesLnet/minecraft/server/world/ServerEntityManager;addEntities(Ljava/util/stream/Stream;)V
-
startTicking
private void startTicking(T entity)
- Mappings:
Namespace Name Mixin selector official cLcnm;c(Lcnb;)Vintermediary method_31838Lnet/minecraft/class_5579;method_31838(Lnet/minecraft/class_5568;)Vnamed startTickingLnet/minecraft/server/world/ServerEntityManager;startTicking(Lnet/minecraft/world/entity/EntityLike;)V
-
stopTicking
private void stopTicking(T entity)
- Mappings:
Namespace Name Mixin selector official dLcnm;d(Lcnb;)Vintermediary method_31843Lnet/minecraft/class_5579;method_31843(Lnet/minecraft/class_5568;)Vnamed stopTickingLnet/minecraft/server/world/ServerEntityManager;stopTicking(Lnet/minecraft/world/entity/EntityLike;)V
-
startTracking
private void startTracking(T entity)
- Mappings:
Namespace Name Mixin selector official eLcnm;e(Lcnb;)Vintermediary method_31847Lnet/minecraft/class_5579;method_31847(Lnet/minecraft/class_5568;)Vnamed startTrackingLnet/minecraft/server/world/ServerEntityManager;startTracking(Lnet/minecraft/world/entity/EntityLike;)V
-
stopTracking
private void stopTracking(T entity)
- Mappings:
Namespace Name Mixin selector official fLcnm;f(Lcnb;)Vintermediary method_31850Lnet/minecraft/class_5579;method_31850(Lnet/minecraft/class_5568;)Vnamed stopTrackingLnet/minecraft/server/world/ServerEntityManager;stopTracking(Lnet/minecraft/world/entity/EntityLike;)V
-
updateTrackingStatus
public void updateTrackingStatus(ChunkPos chunkPos, ChunkHolder.LevelType levelType)
Updates the tracking status of tracking sections in a chunk atchunkPosgiven thelevelType.- 参数:
chunkPos- the chunk to updatelevelType- the updated level type of the chunk- 另请参阅:
updateTrackingStatus(net.minecraft.util.math.ChunkPos,net.minecraft.world.entity.EntityTrackingStatus)- Mappings:
Namespace Name Mixin selector official aLcnm;a(Lbuw;Laav$c;)Vintermediary method_31815Lnet/minecraft/class_5579;method_31815(Lnet/minecraft/class_1923;Lnet/minecraft/class_3193$class_3194;)Vnamed updateTrackingStatusLnet/minecraft/server/world/ServerEntityManager;updateTrackingStatus(Lnet/minecraft/util/math/ChunkPos;Lnet/minecraft/server/world/ChunkHolder$LevelType;)V
-
updateTrackingStatus
public void updateTrackingStatus(ChunkPos chunkPos, EntityTrackingStatus trackingStatus)
Updates thetrackingStatusof tracking sections in a chunk atchunkPos.- 参数:
chunkPos- the chunk to updatetrackingStatus- the updated section tracking status- Mappings:
Namespace Name Mixin selector official aLcnm;a(Lbuw;Lcno;)Vintermediary method_31816Lnet/minecraft/class_5579;method_31816(Lnet/minecraft/class_1923;Lnet/minecraft/class_5584;)Vnamed updateTrackingStatusLnet/minecraft/server/world/ServerEntityManager;updateTrackingStatus(Lnet/minecraft/util/math/ChunkPos;Lnet/minecraft/world/entity/EntityTrackingStatus;)V
-
readIfFresh
private void readIfFresh(long chunkPos)
- Mappings:
Namespace Name Mixin selector official aLcnm;a(J)Vintermediary method_31810Lnet/minecraft/class_5579;method_31810(J)Vnamed readIfFreshLnet/minecraft/server/world/ServerEntityManager;readIfFresh(J)V
-
trySave
private boolean trySave(long chunkPos, Consumer<T> action)Tries to save entities in a chunk and performs anactionon each saved entity if successful.If a chunk is
ServerEntityManager.Status.FRESHorServerEntityManager.Status.PENDING, it cannot be saved.- 参数:
action- action performed on each saved entity if saving is successful- 返回:
- whether the saving is successful
- Mappings:
Namespace Name Mixin selector official aLcnm;a(JLjava/util/function/Consumer;)Zintermediary method_31812Lnet/minecraft/class_5579;method_31812(JLjava/util/function/Consumer;)Znamed trySaveLnet/minecraft/server/world/ServerEntityManager;trySave(JLjava/util/function/Consumer;)Z
-
scheduleRead
private void scheduleRead(long chunkPos)
- Mappings:
Namespace Name Mixin selector official bLcnm;b(J)Vintermediary method_31830Lnet/minecraft/class_5579;method_31830(J)Vnamed scheduleReadLnet/minecraft/server/world/ServerEntityManager;scheduleRead(J)V
-
unload
private boolean unload(long chunkPos)
- Mappings:
Namespace Name Mixin selector official cLcnm;c(J)Zintermediary method_31837Lnet/minecraft/class_5579;method_31837(J)Znamed unloadLnet/minecraft/server/world/ServerEntityManager;unload(J)Z
-
unload
private void unload(EntityLike entity)
- Mappings:
Namespace Name Mixin selector official gLcnm;g(Lcnb;)Vintermediary method_31852Lnet/minecraft/class_5579;method_31852(Lnet/minecraft/class_5568;)Vnamed unloadLnet/minecraft/server/world/ServerEntityManager;unload(Lnet/minecraft/world/entity/EntityLike;)V
-
unloadChunks
private void unloadChunks()
- Mappings:
Namespace Name Mixin selector official gLcnm;g()Vintermediary method_31851Lnet/minecraft/class_5579;method_31851()Vnamed unloadChunksLnet/minecraft/server/world/ServerEntityManager;unloadChunks()V
-
loadChunks
private void loadChunks()
- Mappings:
Namespace Name Mixin selector official hLcnm;h()Vintermediary method_31853Lnet/minecraft/class_5579;method_31853()Vnamed loadChunksLnet/minecraft/server/world/ServerEntityManager;loadChunks()V
-
tick
public void tick()
- Mappings:
Namespace Name Mixin selector official aLcnm;a()Vintermediary method_31809Lnet/minecraft/class_5579;method_31809()Vnamed tickLnet/minecraft/server/world/ServerEntityManager;tick()V
-
getLoadedChunks
private LongSet getLoadedChunks()
- Mappings:
Namespace Name Mixin selector official iLcnm;i()Lit/unimi/dsi/fastutil/longs/LongSet;intermediary method_31855Lnet/minecraft/class_5579;method_31855()Lit/unimi/dsi/fastutil/longs/LongSet;named getLoadedChunksLnet/minecraft/server/world/ServerEntityManager;getLoadedChunks()Lit/unimi/dsi/fastutil/longs/LongSet;
-
save
public void save()
- Mappings:
Namespace Name Mixin selector official bLcnm;b()Vintermediary method_31829Lnet/minecraft/class_5579;method_31829()Vnamed saveLnet/minecraft/server/world/ServerEntityManager;save()V
-
flush
public void flush()
- Mappings:
Namespace Name Mixin selector official cLcnm;c()Vintermediary method_31836Lnet/minecraft/class_5579;method_31836()Vnamed flushLnet/minecraft/server/world/ServerEntityManager;flush()V
-
close
public void close() throws IOException- 指定者:
close在接口中AutoCloseable- 抛出:
IOException- Mappings:
Namespace Name Mixin selector official closeLcnm;close()Vintermediary closeLnet/minecraft/class_5579;close()Vnamed closeLnet/minecraft/server/world/ServerEntityManager;close()V
-
has
public boolean has(UUID uuid)
- Mappings:
Namespace Name Mixin selector official aLcnm;a(Ljava/util/UUID;)Zintermediary method_31827Lnet/minecraft/class_5579;method_31827(Ljava/util/UUID;)Znamed hasLnet/minecraft/server/world/ServerEntityManager;has(Ljava/util/UUID;)Z
-
getLookup
public EntityLookup<T> getLookup()
- Mappings:
Namespace Name Mixin selector official dLcnm;d()Lcnk;intermediary method_31841Lnet/minecraft/class_5579;method_31841()Lnet/minecraft/class_5577;named getLookupLnet/minecraft/server/world/ServerEntityManager;getLookup()Lnet/minecraft/world/entity/EntityLookup;
-
dump
public void dump(Writer writer) throws IOException
- 抛出:
IOException- Mappings:
Namespace Name Mixin selector official aLcnm;a(Ljava/io/Writer;)Vintermediary method_31826Lnet/minecraft/class_5579;method_31826(Ljava/io/Writer;)Vnamed dumpLnet/minecraft/server/world/ServerEntityManager;dump(Ljava/io/Writer;)V
-
getDebugString
public String getDebugString()
- Mappings:
Namespace Name Mixin selector official eLcnm;e()Ljava/lang/String;intermediary method_31845Lnet/minecraft/class_5579;method_31845()Ljava/lang/String;named getDebugStringLnet/minecraft/server/world/ServerEntityManager;getDebugString()Ljava/lang/String;
-
-