类 EntitySectionStorage<T extends EntityAccess>

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

public class EntitySectionStorage<T extends EntityAccess> extends Object
  • 字段详细资料

    • 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
  • 构造器详细资料

    • EntitySectionStorage

      public EntitySectionStorage(Class<T> pEntityClass, it.unimi.dsi.fastutil.longs.Long2ObjectFunction<Visibility> pInitialSectionVisibility)
  • 方法详细资料

    • forEachAccessibleNonEmptySection

      public void forEachAccessibleNonEmptySection(AABB pBoundingBox, AbortableIterationConsumer<EntitySection<T>> pConsumer)
    • getExistingSectionPositionsInChunk

      public LongStream getExistingSectionPositionsInChunk(long pPos)
    • getChunkSections

      private it.unimi.dsi.fastutil.longs.LongSortedSet getChunkSections(int pX, int pZ)
    • getExistingSectionsInChunk

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

      private static long getChunkKeyFromSectionKey(long pPos)
    • getOrCreateSection

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

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

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

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

      public void getEntities(AABB pBounds, AbortableIterationConsumer<T> pConsumer)
    • getEntities

      public <U extends T> void getEntities(EntityTypeTest<T,U> pTest, AABB pBounds, AbortableIterationConsumer<U> pConsumer)
    • remove

      public void remove(long pSectionId)
    • count

      public int count()