类 ServerEntityManager<T extends EntityLike>

  • 所有已实现的接口:
    AutoCloseable

    public class ServerEntityManager<T extends EntityLike>
    extends Object
    implements AutoCloseable
    An entity manager for a server environment.
    Mappings:
    Namespace Name
    official cnm
    intermediary net/minecraft/class_5579
    named net/minecraft/server/world/ServerEntityManager
    • 字段详细资料

      • LOGGER

        private static final Logger LOGGER
        Mappings:
        Namespace Name Mixin selector
        official a Lcnm;a:Lorg/apache/logging/log4j/Logger;
        intermediary field_27260 Lnet/minecraft/class_5579;field_27260:Lorg/apache/logging/log4j/Logger;
        named LOGGER Lnet/minecraft/server/world/ServerEntityManager;LOGGER:Lorg/apache/logging/log4j/Logger;
      • entityUuids

        private final Set<UUID> entityUuids
        Mappings:
        Namespace Name Mixin selector
        official b Lcnm;b:Ljava/util/Set;
        intermediary field_27261 Lnet/minecraft/class_5579;field_27261:Ljava/util/Set;
        named entityUuids Lnet/minecraft/server/world/ServerEntityManager;entityUuids:Ljava/util/Set;
      • handler

        private final EntityHandler<T extends EntityLike> handler
        Mappings:
        Namespace Name Mixin selector
        official c Lcnm;c:Lcnj;
        intermediary field_27262 Lnet/minecraft/class_5579;field_27262:Lnet/minecraft/class_5576;
        named handler Lnet/minecraft/server/world/ServerEntityManager;handler:Lnet/minecraft/world/entity/EntityHandler;
      • dataAccess

        private final ChunkDataAccess<T extends EntityLike> dataAccess
        Mappings:
        Namespace Name Mixin selector
        official d Lcnm;d:Lcne;
        intermediary field_27263 Lnet/minecraft/class_5579;field_27263:Lnet/minecraft/class_5571;
        named dataAccess Lnet/minecraft/server/world/ServerEntityManager;dataAccess:Lnet/minecraft/world/storage/ChunkDataAccess;
      • index

        private final EntityIndex<T extends EntityLike> index
        Mappings:
        Namespace Name Mixin selector
        official e Lcnm;e:Lcnd;
        intermediary field_27264 Lnet/minecraft/class_5579;field_27264:Lnet/minecraft/class_5570;
        named index Lnet/minecraft/server/world/ServerEntityManager;index:Lnet/minecraft/world/entity/EntityIndex;
      • cache

        private final SectionedEntityCache<T extends EntityLike> cache
        Mappings:
        Namespace Name Mixin selector
        official f Lcnm;f:Lcng;
        intermediary field_27265 Lnet/minecraft/class_5579;field_27265:Lnet/minecraft/class_5573;
        named cache Lnet/minecraft/server/world/ServerEntityManager;cache:Lnet/minecraft/world/entity/SectionedEntityCache;
      • lookup

        private final EntityLookup<T extends EntityLike> lookup
        Mappings:
        Namespace Name Mixin selector
        official g Lcnm;g:Lcnk;
        intermediary field_27266 Lnet/minecraft/class_5579;field_27266:Lnet/minecraft/class_5577;
        named lookup Lnet/minecraft/server/world/ServerEntityManager;lookup:Lnet/minecraft/world/entity/EntityLookup;
      • trackingStatuses

        private final Long2ObjectMap<EntityTrackingStatus> trackingStatuses
        Mappings:
        Namespace Name Mixin selector
        official h Lcnm;h:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
        intermediary field_27267 Lnet/minecraft/class_5579;field_27267:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
        named trackingStatuses Lnet/minecraft/server/world/ServerEntityManager;trackingStatuses:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
      • managedStatuses

        private final Long2ObjectMap<ServerEntityManager.Status> managedStatuses
        Mappings:
        Namespace Name Mixin selector
        official i Lcnm;i:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
        intermediary field_27268 Lnet/minecraft/class_5579;field_27268:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
        named managedStatuses Lnet/minecraft/server/world/ServerEntityManager;managedStatuses:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
      • pendingUnloads

        private final LongSet pendingUnloads
        Mappings:
        Namespace Name Mixin selector
        official j Lcnm;j:Lit/unimi/dsi/fastutil/longs/LongSet;
        intermediary field_27269 Lnet/minecraft/class_5579;field_27269:Lit/unimi/dsi/fastutil/longs/LongSet;
        named pendingUnloads Lnet/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 k Lcnm;k:Ljava/util/Queue;
        intermediary field_27270 Lnet/minecraft/class_5579;field_27270:Ljava/util/Queue;
        named loadingQueue Lnet/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;)V
        intermediary <init> Lnet/minecraft/class_5579;<init>(Ljava/lang/Class;Lnet/minecraft/class_5576;Lnet/minecraft/class_5571;)V
        named <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 a Lcnm;a(JLcnf;)V
        intermediary method_31811 Lnet/minecraft/class_5579;method_31811(JLnet/minecraft/class_5572;)V
        named entityLeftSection Lnet/minecraft/server/world/ServerEntityManager;entityLeftSection(JLnet/minecraft/world/entity/EntityTrackingSection;)V
      • addEntityUuid

        private boolean addEntityUuid​(T entity)
        Mappings:
        Namespace Name Mixin selector
        official b Lcnm;b(Lcnb;)Z
        intermediary method_31831 Lnet/minecraft/class_5579;method_31831(Lnet/minecraft/class_5568;)Z
        named addEntityUuid Lnet/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 a Lcnm;a(Lcnb;)Z
        intermediary method_31818 Lnet/minecraft/class_5579;method_31818(Lnet/minecraft/class_5568;)Z
        named addEntity Lnet/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 entity
        existing - whether this entity is loaded from the map than created anew
        返回:
        if the entity was loaded or added
        Mappings:
        Namespace Name Mixin selector
        official a Lcnm;a(Lcnb;Z)Z
        intermediary method_31820 Lnet/minecraft/class_5579;method_31820(Lnet/minecraft/class_5568;Z)Z
        named addEntity Lnet/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 b Lcnm;b(Lcnb;Lcno;)Lcno;
        intermediary method_31832 Lnet/minecraft/class_5579;method_31832(Lnet/minecraft/class_5568;Lnet/minecraft/class_5584;)Lnet/minecraft/class_5584;
        named getNeededLoadStatus Lnet/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 a Lcnm;a(Ljava/util/stream/Stream;)V
        intermediary method_31828 Lnet/minecraft/class_5579;method_31828(Ljava/util/stream/Stream;)V
        named loadEntities Lnet/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 b Lcnm;b(Ljava/util/stream/Stream;)V
        intermediary method_31835 Lnet/minecraft/class_5579;method_31835(Ljava/util/stream/Stream;)V
        named addEntities Lnet/minecraft/server/world/ServerEntityManager;addEntities(Ljava/util/stream/Stream;)V
      • startTicking

        private void startTicking​(T entity)
        Mappings:
        Namespace Name Mixin selector
        official c Lcnm;c(Lcnb;)V
        intermediary method_31838 Lnet/minecraft/class_5579;method_31838(Lnet/minecraft/class_5568;)V
        named startTicking Lnet/minecraft/server/world/ServerEntityManager;startTicking(Lnet/minecraft/world/entity/EntityLike;)V
      • stopTicking

        private void stopTicking​(T entity)
        Mappings:
        Namespace Name Mixin selector
        official d Lcnm;d(Lcnb;)V
        intermediary method_31843 Lnet/minecraft/class_5579;method_31843(Lnet/minecraft/class_5568;)V
        named stopTicking Lnet/minecraft/server/world/ServerEntityManager;stopTicking(Lnet/minecraft/world/entity/EntityLike;)V
      • startTracking

        private void startTracking​(T entity)
        Mappings:
        Namespace Name Mixin selector
        official e Lcnm;e(Lcnb;)V
        intermediary method_31847 Lnet/minecraft/class_5579;method_31847(Lnet/minecraft/class_5568;)V
        named startTracking Lnet/minecraft/server/world/ServerEntityManager;startTracking(Lnet/minecraft/world/entity/EntityLike;)V
      • stopTracking

        private void stopTracking​(T entity)
        Mappings:
        Namespace Name Mixin selector
        official f Lcnm;f(Lcnb;)V
        intermediary method_31850 Lnet/minecraft/class_5579;method_31850(Lnet/minecraft/class_5568;)V
        named stopTracking Lnet/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 at chunkPos given the levelType.
        参数:
        chunkPos - the chunk to update
        levelType - the updated level type of the chunk
        另请参阅:
        updateTrackingStatus(net.minecraft.util.math.ChunkPos,net.minecraft.world.entity.EntityTrackingStatus)
        Mappings:
        Namespace Name Mixin selector
        official a Lcnm;a(Lbuw;Laav$c;)V
        intermediary method_31815 Lnet/minecraft/class_5579;method_31815(Lnet/minecraft/class_1923;Lnet/minecraft/class_3193$class_3194;)V
        named updateTrackingStatus Lnet/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 the trackingStatus of tracking sections in a chunk at chunkPos.
        参数:
        chunkPos - the chunk to update
        trackingStatus - the updated section tracking status
        Mappings:
        Namespace Name Mixin selector
        official a Lcnm;a(Lbuw;Lcno;)V
        intermediary method_31816 Lnet/minecraft/class_5579;method_31816(Lnet/minecraft/class_1923;Lnet/minecraft/class_5584;)V
        named updateTrackingStatus Lnet/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 a Lcnm;a(J)V
        intermediary method_31810 Lnet/minecraft/class_5579;method_31810(J)V
        named readIfFresh Lnet/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 an action on each saved entity if successful.

        If a chunk is ServerEntityManager.Status.FRESH or ServerEntityManager.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 a Lcnm;a(JLjava/util/function/Consumer;)Z
        intermediary method_31812 Lnet/minecraft/class_5579;method_31812(JLjava/util/function/Consumer;)Z
        named trySave Lnet/minecraft/server/world/ServerEntityManager;trySave(JLjava/util/function/Consumer;)Z
      • scheduleRead

        private void scheduleRead​(long chunkPos)
        Mappings:
        Namespace Name Mixin selector
        official b Lcnm;b(J)V
        intermediary method_31830 Lnet/minecraft/class_5579;method_31830(J)V
        named scheduleRead Lnet/minecraft/server/world/ServerEntityManager;scheduleRead(J)V
      • unload

        private boolean unload​(long chunkPos)
        Mappings:
        Namespace Name Mixin selector
        official c Lcnm;c(J)Z
        intermediary method_31837 Lnet/minecraft/class_5579;method_31837(J)Z
        named unload Lnet/minecraft/server/world/ServerEntityManager;unload(J)Z
      • unload

        private void unload​(EntityLike entity)
        Mappings:
        Namespace Name Mixin selector
        official g Lcnm;g(Lcnb;)V
        intermediary method_31852 Lnet/minecraft/class_5579;method_31852(Lnet/minecraft/class_5568;)V
        named unload Lnet/minecraft/server/world/ServerEntityManager;unload(Lnet/minecraft/world/entity/EntityLike;)V
      • unloadChunks

        private void unloadChunks()
        Mappings:
        Namespace Name Mixin selector
        official g Lcnm;g()V
        intermediary method_31851 Lnet/minecraft/class_5579;method_31851()V
        named unloadChunks Lnet/minecraft/server/world/ServerEntityManager;unloadChunks()V
      • loadChunks

        private void loadChunks()
        Mappings:
        Namespace Name Mixin selector
        official h Lcnm;h()V
        intermediary method_31853 Lnet/minecraft/class_5579;method_31853()V
        named loadChunks Lnet/minecraft/server/world/ServerEntityManager;loadChunks()V
      • tick

        public void tick()
        Mappings:
        Namespace Name Mixin selector
        official a Lcnm;a()V
        intermediary method_31809 Lnet/minecraft/class_5579;method_31809()V
        named tick Lnet/minecraft/server/world/ServerEntityManager;tick()V
      • getLoadedChunks

        private LongSet getLoadedChunks()
        Mappings:
        Namespace Name Mixin selector
        official i Lcnm;i()Lit/unimi/dsi/fastutil/longs/LongSet;
        intermediary method_31855 Lnet/minecraft/class_5579;method_31855()Lit/unimi/dsi/fastutil/longs/LongSet;
        named getLoadedChunks Lnet/minecraft/server/world/ServerEntityManager;getLoadedChunks()Lit/unimi/dsi/fastutil/longs/LongSet;
      • save

        public void save()
        Mappings:
        Namespace Name Mixin selector
        official b Lcnm;b()V
        intermediary method_31829 Lnet/minecraft/class_5579;method_31829()V
        named save Lnet/minecraft/server/world/ServerEntityManager;save()V
      • flush

        public void flush()
        Mappings:
        Namespace Name Mixin selector
        official c Lcnm;c()V
        intermediary method_31836 Lnet/minecraft/class_5579;method_31836()V
        named flush Lnet/minecraft/server/world/ServerEntityManager;flush()V
      • close

        public void close()
                   throws IOException
        指定者:
        close 在接口中 AutoCloseable
        抛出:
        IOException
        Mappings:
        Namespace Name Mixin selector
        official close Lcnm;close()V
        intermediary close Lnet/minecraft/class_5579;close()V
        named close Lnet/minecraft/server/world/ServerEntityManager;close()V
      • has

        public boolean has​(UUID uuid)
        Mappings:
        Namespace Name Mixin selector
        official a Lcnm;a(Ljava/util/UUID;)Z
        intermediary method_31827 Lnet/minecraft/class_5579;method_31827(Ljava/util/UUID;)Z
        named has Lnet/minecraft/server/world/ServerEntityManager;has(Ljava/util/UUID;)Z
      • getLookup

        public EntityLookup<T> getLookup()
        Mappings:
        Namespace Name Mixin selector
        official d Lcnm;d()Lcnk;
        intermediary method_31841 Lnet/minecraft/class_5579;method_31841()Lnet/minecraft/class_5577;
        named getLookup Lnet/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 a Lcnm;a(Ljava/io/Writer;)V
        intermediary method_31826 Lnet/minecraft/class_5579;method_31826(Ljava/io/Writer;)V
        named dump Lnet/minecraft/server/world/ServerEntityManager;dump(Ljava/io/Writer;)V
      • getDebugString

        public String getDebugString()
        Mappings:
        Namespace Name Mixin selector
        official e Lcnm;e()Ljava/lang/String;
        intermediary method_31845 Lnet/minecraft/class_5579;method_31845()Ljava/lang/String;
        named getDebugString Lnet/minecraft/server/world/ServerEntityManager;getDebugString()Ljava/lang/String;