Class EntitySectionStorage<T extends EntityAccess>

java.lang.Object
net.minecraft.world.level.entity.EntitySectionStorage<T>

public class EntitySectionStorage<T extends EntityAccess> extends Object
  • Field Details

    • entityClass

      private final Class<T extends EntityAccess> entityClass
    • intialSectionVisibility

      private final it.unimi.dsi.fastutil.longs.Long2ObjectFunction<Visibility> intialSectionVisibility
    • sections

      private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<EntitySection<T extends EntityAccess>> sections
    • sectionIds

      private final it.unimi.dsi.fastutil.longs.LongSortedSet sectionIds
  • Constructor Details

    • EntitySectionStorage

      public EntitySectionStorage(Class<T> entityClass, it.unimi.dsi.fastutil.longs.Long2ObjectFunction<Visibility> initialSectionVisibility)
  • Method Details

    • forEachAccessibleNonEmptySection

      public void forEachAccessibleNonEmptySection(AABB boundingBox, AbortableIterationConsumer<EntitySection<T>> consumer)
    • getExistingSectionPositionsInChunk

      public LongStream getExistingSectionPositionsInChunk(long pos)
    • getChunkSections

      private it.unimi.dsi.fastutil.longs.LongSortedSet getChunkSections(int x, int z)
    • getExistingSectionsInChunk

      public Stream<EntitySection<T>> getExistingSectionsInChunk(long pos)
    • getChunkKeyFromSectionKey

      private static long getChunkKeyFromSectionKey(long pos)
    • getOrCreateSection

      public EntitySection<T> getOrCreateSection(long sectionPos)
    • getSection

      @Nullable public EntitySection<T> getSection(long sectionPos)
    • createSection

      private EntitySection<T> createSection(long sectionPos)
    • getAllChunksWithExistingSections

      public it.unimi.dsi.fastutil.longs.LongSet getAllChunksWithExistingSections()
    • getEntities

      public void getEntities(AABB bounds, AbortableIterationConsumer<T> consumer)
    • getEntities

      public <U extends T> void getEntities(EntityTypeTest<T,U> test, AABB bounds, AbortableIterationConsumer<U> consumer)
    • remove

      public void remove(long sectionId)
    • count

      public int count()