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> p_156855_, it.unimi.dsi.fastutil.longs.Long2ObjectFunction<Visibility> p_156856_)
  • Method Details

    • forEachAccessibleSection

      public void forEachAccessibleSection(AABB p_156878_, Consumer<EntitySection<T>> p_156879_)
    • getExistingSectionPositionsInChunk

      public LongStream getExistingSectionPositionsInChunk(long p_156862_)
    • getChunkSections

      private it.unimi.dsi.fastutil.longs.LongSortedSet getChunkSections(int p_156859_, int p_156860_)
    • getExistingSectionsInChunk

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

      private static long getChunkKeyFromSectionKey(long p_156900_)
    • getOrCreateSection

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

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

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

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

      private static <T extends EntityAccess> Predicate<T> createBoundingBoxCheck(AABB p_156873_)
    • getEntities

      public void getEntities(AABB p_156891_, Consumer<T> p_156892_)
    • getEntities

      public <U extends T> void getEntities(EntityTypeTest<T,​U> p_156864_, AABB p_156865_, Consumer<U> p_156866_)
    • remove

      public void remove(long p_156898_)
    • count

      public int count()