Class ServerEntityManager<T extends EntityLike>

java.lang.Object
net.minecraft.server.world.ServerEntityManager<T>
All Implemented Interfaces:
AutoCloseable

public class ServerEntityManager<T extends EntityLike> extends Object implements AutoCloseable
An entity manager for a server environment.
Mappings:
Namespace Name
named net/minecraft/server/world/ServerEntityManager
intermediary net/minecraft/class_5579
official ebm
  • Field Details Link icon

    • LOGGER Link icon

      static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/server/world/ServerEntityManager;LOGGER:Lorg/slf4j/Logger;
      intermediary field_27260 Lnet/minecraft/class_5579;field_27260:Lorg/slf4j/Logger;
      official a Lebm;a:Lorg/slf4j/Logger;
    • entityUuids Link icon

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

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

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

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

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

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

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

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

      private final LongSet pendingUnloads
      Mappings:
      Namespace Name Mixin selector
      named pendingUnloads Lnet/minecraft/server/world/ServerEntityManager;pendingUnloads:Lit/unimi/dsi/fastutil/longs/LongSet;
      intermediary field_27269 Lnet/minecraft/class_5579;field_27269:Lit/unimi/dsi/fastutil/longs/LongSet;
      official j Lebm;j:Lit/unimi/dsi/fastutil/longs/LongSet;
    • loadingQueue Link icon

      private final Queue<ChunkDataList<T extends EntityLike>> loadingQueue
      Mappings:
      Namespace Name Mixin selector
      named loadingQueue Lnet/minecraft/server/world/ServerEntityManager;loadingQueue:Ljava/util/Queue;
      intermediary field_27270 Lnet/minecraft/class_5579;field_27270:Ljava/util/Queue;
      official k Lebm;k:Ljava/util/Queue;
  • Constructor Details Link icon

    • ServerEntityManager Link icon

      public ServerEntityManager(Class<T> entityClass, EntityHandler<T> handler, ChunkDataAccess<T> dataAccess)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/server/world/ServerEntityManager;<init>(Ljava/lang/Class;Lnet/minecraft/world/entity/EntityHandler;Lnet/minecraft/world/storage/ChunkDataAccess;)V
      intermediary <init> Lnet/minecraft/class_5579;<init>(Ljava/lang/Class;Lnet/minecraft/class_5576;Lnet/minecraft/class_5571;)V
      official <init> Lebm;<init>(Ljava/lang/Class;Lebj;Lebe;)V
  • Method Details Link icon

    • entityLeftSection Link icon

      void entityLeftSection(long sectionPos, EntityTrackingSection<T> section)
      Mappings:
      Namespace Name Mixin selector
      named entityLeftSection Lnet/minecraft/server/world/ServerEntityManager;entityLeftSection(JLnet/minecraft/world/entity/EntityTrackingSection;)V
      intermediary method_31811 Lnet/minecraft/class_5579;method_31811(JLnet/minecraft/class_5572;)V
      official a Lebm;a(JLebf;)V
    • addEntityUuid Link icon

      private boolean addEntityUuid(T entity)
      Mappings:
      Namespace Name Mixin selector
      named addEntityUuid Lnet/minecraft/server/world/ServerEntityManager;addEntityUuid(Lnet/minecraft/world/entity/EntityLike;)Z
      intermediary method_31831 Lnet/minecraft/class_5579;method_31831(Lnet/minecraft/class_5568;)Z
      official b Lebm;b(Lebb;)Z
    • addEntity Link icon

      public boolean addEntity(T entity)
      Adds a newly created entity to this manager.
      Parameters:
      entity - the newly created entity
      Returns:
      if the entity was added
      Mappings:
      Namespace Name Mixin selector
      named addEntity Lnet/minecraft/server/world/ServerEntityManager;addEntity(Lnet/minecraft/world/entity/EntityLike;)Z
      intermediary method_31818 Lnet/minecraft/class_5579;method_31818(Lnet/minecraft/class_5568;)Z
      official a Lebm;a(Lebb;)Z
    • addEntity Link icon

      private boolean addEntity(T entity, boolean existing)
      Loads or adds an entity to this manager.
      Parameters:
      entity - the entity
      existing - whether this entity is loaded from the map than created anew
      Returns:
      if the entity was loaded or added
      Mappings:
      Namespace Name Mixin selector
      named addEntity Lnet/minecraft/server/world/ServerEntityManager;addEntity(Lnet/minecraft/world/entity/EntityLike;Z)Z
      intermediary method_31820 Lnet/minecraft/class_5579;method_31820(Lnet/minecraft/class_5568;Z)Z
      official a Lebm;a(Lebb;Z)Z
    • getNeededLoadStatus Link icon

      static <T extends EntityLike> EntityTrackingStatus getNeededLoadStatus(T entity, EntityTrackingStatus current)
      Mappings:
      Namespace Name Mixin selector
      named getNeededLoadStatus Lnet/minecraft/server/world/ServerEntityManager;getNeededLoadStatus(Lnet/minecraft/world/entity/EntityLike;Lnet/minecraft/world/entity/EntityTrackingStatus;)Lnet/minecraft/world/entity/EntityTrackingStatus;
      intermediary method_31832 Lnet/minecraft/class_5579;method_31832(Lnet/minecraft/class_5568;Lnet/minecraft/class_5584;)Lnet/minecraft/class_5584;
      official a Lebm;a(Lebb;Lebo;)Lebo;
    • loadEntities Link icon

      public void loadEntities(Stream<T> entities)
      Loads a few entities from disk to this manager.
      Mappings:
      Namespace Name Mixin selector
      named loadEntities Lnet/minecraft/server/world/ServerEntityManager;loadEntities(Ljava/util/stream/Stream;)V
      intermediary method_31828 Lnet/minecraft/class_5579;method_31828(Ljava/util/stream/Stream;)V
      official a Lebm;a(Ljava/util/stream/Stream;)V
    • addEntities Link icon

      public void addEntities(Stream<T> entities)
      Adds a few newly created entities to this manager.
      Mappings:
      Namespace Name Mixin selector
      named addEntities Lnet/minecraft/server/world/ServerEntityManager;addEntities(Ljava/util/stream/Stream;)V
      intermediary method_31835 Lnet/minecraft/class_5579;method_31835(Ljava/util/stream/Stream;)V
      official b Lebm;b(Ljava/util/stream/Stream;)V
    • startTicking Link icon

      void startTicking(T entity)
      Mappings:
      Namespace Name Mixin selector
      named startTicking Lnet/minecraft/server/world/ServerEntityManager;startTicking(Lnet/minecraft/world/entity/EntityLike;)V
      intermediary method_31838 Lnet/minecraft/class_5579;method_31838(Lnet/minecraft/class_5568;)V
      official c Lebm;c(Lebb;)V
    • stopTicking Link icon

      void stopTicking(T entity)
      Mappings:
      Namespace Name Mixin selector
      named stopTicking Lnet/minecraft/server/world/ServerEntityManager;stopTicking(Lnet/minecraft/world/entity/EntityLike;)V
      intermediary method_31843 Lnet/minecraft/class_5579;method_31843(Lnet/minecraft/class_5568;)V
      official d Lebm;d(Lebb;)V
    • startTracking Link icon

      void startTracking(T entity)
      Mappings:
      Namespace Name Mixin selector
      named startTracking Lnet/minecraft/server/world/ServerEntityManager;startTracking(Lnet/minecraft/world/entity/EntityLike;)V
      intermediary method_31847 Lnet/minecraft/class_5579;method_31847(Lnet/minecraft/class_5568;)V
      official e Lebm;e(Lebb;)V
    • stopTracking Link icon

      void stopTracking(T entity)
      Mappings:
      Namespace Name Mixin selector
      named stopTracking Lnet/minecraft/server/world/ServerEntityManager;stopTracking(Lnet/minecraft/world/entity/EntityLike;)V
      intermediary method_31850 Lnet/minecraft/class_5579;method_31850(Lnet/minecraft/class_5568;)V
      official f Lebm;f(Lebb;)V
    • updateTrackingStatus Link icon

      public void updateTrackingStatus(ChunkPos chunkPos, ChunkLevelType levelType)
      Updates the tracking status of tracking sections in a chunk at chunkPos given the levelType.
      Parameters:
      chunkPos - the chunk to update
      levelType - the updated level type of the chunk
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named updateTrackingStatus Lnet/minecraft/server/world/ServerEntityManager;updateTrackingStatus(Lnet/minecraft/util/math/ChunkPos;Lnet/minecraft/server/world/ChunkLevelType;)V
      intermediary method_31815 Lnet/minecraft/class_5579;method_31815(Lnet/minecraft/class_1923;Lnet/minecraft/class_3194;)V
      official a Lebm;a(Ldfp;Laqs;)V
    • updateTrackingStatus Link icon

      public void updateTrackingStatus(ChunkPos chunkPos, EntityTrackingStatus trackingStatus)
      Updates the trackingStatus of tracking sections in a chunk at chunkPos.
      Parameters:
      chunkPos - the chunk to update
      trackingStatus - the updated section tracking status
      Mappings:
      Namespace Name Mixin selector
      named updateTrackingStatus Lnet/minecraft/server/world/ServerEntityManager;updateTrackingStatus(Lnet/minecraft/util/math/ChunkPos;Lnet/minecraft/world/entity/EntityTrackingStatus;)V
      intermediary method_31816 Lnet/minecraft/class_5579;method_31816(Lnet/minecraft/class_1923;Lnet/minecraft/class_5584;)V
      official a Lebm;a(Ldfp;Lebo;)V
    • readIfFresh Link icon

      private void readIfFresh(long chunkPos)
      Mappings:
      Namespace Name Mixin selector
      named readIfFresh Lnet/minecraft/server/world/ServerEntityManager;readIfFresh(J)V
      intermediary method_31810 Lnet/minecraft/class_5579;method_31810(J)V
      official b Lebm;b(J)V
    • trySave Link icon

      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.

      Parameters:
      action - action performed on each saved entity if saving is successful
      Returns:
      whether the saving is successful
      Mappings:
      Namespace Name Mixin selector
      named trySave Lnet/minecraft/server/world/ServerEntityManager;trySave(JLjava/util/function/Consumer;)Z
      intermediary method_31812 Lnet/minecraft/class_5579;method_31812(JLjava/util/function/Consumer;)Z
      official a Lebm;a(JLjava/util/function/Consumer;)Z
    • scheduleRead Link icon

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

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

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

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

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

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

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

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

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

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException
    • has Link icon

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

      public EntityLookup<T> getLookup()
      Mappings:
      Namespace Name Mixin selector
      named getLookup Lnet/minecraft/server/world/ServerEntityManager;getLookup()Lnet/minecraft/world/entity/EntityLookup;
      intermediary method_31841 Lnet/minecraft/class_5579;method_31841()Lnet/minecraft/class_5577;
      official d Lebm;d()Lebk;
    • shouldTick Link icon

      public boolean shouldTick(BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named shouldTick Lnet/minecraft/server/world/ServerEntityManager;shouldTick(Lnet/minecraft/util/math/BlockPos;)Z
      intermediary method_40022 Lnet/minecraft/class_5579;method_40022(Lnet/minecraft/class_2338;)Z
      official a Lebm;a(Lji;)Z
    • shouldTick Link icon

      public boolean shouldTick(ChunkPos pos)
      Mappings:
      Namespace Name Mixin selector
      named shouldTick Lnet/minecraft/server/world/ServerEntityManager;shouldTick(Lnet/minecraft/util/math/ChunkPos;)Z
      intermediary method_40021 Lnet/minecraft/class_5579;method_40021(Lnet/minecraft/class_1923;)Z
      official a Lebm;a(Ldfp;)Z
    • isLoaded Link icon

      public boolean isLoaded(long chunkPos)
      Mappings:
      Namespace Name Mixin selector
      named isLoaded Lnet/minecraft/server/world/ServerEntityManager;isLoaded(J)Z
      intermediary method_37252 Lnet/minecraft/class_5579;method_37252(J)Z
      official a Lebm;a(J)Z
    • dump Link icon

      public void dump(Writer writer) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named dump Lnet/minecraft/server/world/ServerEntityManager;dump(Ljava/io/Writer;)V
      intermediary method_31826 Lnet/minecraft/class_5579;method_31826(Ljava/io/Writer;)V
      official a Lebm;a(Ljava/io/Writer;)V
    • getDebugString Link icon

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

      public int getIndexSize()
      Mappings:
      Namespace Name Mixin selector
      named getIndexSize Lnet/minecraft/server/world/ServerEntityManager;getIndexSize()I
      intermediary method_54490 Lnet/minecraft/class_5579;method_54490()I
      official f Lebm;f()I