Package net.minecraft.world.level.entity
Class EntitySectionStorage<T extends EntityAccess>
java.lang.Object
net.minecraft.world.level.entity.EntitySectionStorage<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.longs.Long2ObjectFunction<Visibility> private final it.unimi.dsi.fastutil.longs.LongSortedSetprivate final it.unimi.dsi.fastutil.longs.Long2ObjectMap<EntitySection<T>> -
Constructor Summary
ConstructorsConstructorDescriptionEntitySectionStorage(Class<T> entityClass, it.unimi.dsi.fastutil.longs.Long2ObjectFunction<Visibility> initialSectionVisibility) -
Method Summary
Modifier and TypeMethodDescriptionintcount()private EntitySection<T> createSection(long sectionPos) voidforEachAccessibleNonEmptySection(AABB boundingBox, AbortableIterationConsumer<EntitySection<T>> consumer) it.unimi.dsi.fastutil.longs.LongSetprivate static longgetChunkKeyFromSectionKey(long pos) private it.unimi.dsi.fastutil.longs.LongSortedSetgetChunkSections(int x, int z) <U extends T>
voidgetEntities(EntityTypeTest<T, U> test, AABB bounds, AbortableIterationConsumer<U> consumer) voidgetEntities(AABB bounds, AbortableIterationConsumer<T> consumer) getExistingSectionPositionsInChunk(long pos) getExistingSectionsInChunk(long pos) getOrCreateSection(long sectionPos) getSection(long sectionPos) voidremove(long sectionId)
-
Field Details
-
entityClass
-
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
-
getChunkSections
private it.unimi.dsi.fastutil.longs.LongSortedSet getChunkSections(int x, int z) -
getExistingSectionsInChunk
-
getChunkKeyFromSectionKey
private static long getChunkKeyFromSectionKey(long pos) -
getOrCreateSection
-
getSection
-
createSection
-
getAllChunksWithExistingSections
public it.unimi.dsi.fastutil.longs.LongSet getAllChunksWithExistingSections() -
getEntities
-
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()
-