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.LongSortedSet
private 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 TypeMethodDescriptionint
count()
private EntitySection
<T> createSection
(long sectionPos) void
forEachAccessibleNonEmptySection
(AABB boundingBox, AbortableIterationConsumer<EntitySection<T>> consumer) it.unimi.dsi.fastutil.longs.LongSet
private static long
getChunkKeyFromSectionKey
(long pos) private it.unimi.dsi.fastutil.longs.LongSortedSet
getChunkSections
(int x, int z) <U extends T>
voidgetEntities
(EntityTypeTest<T, U> test, AABB bounds, AbortableIterationConsumer<U> consumer) void
getEntities
(AABB bounds, AbortableIterationConsumer<T> consumer) getExistingSectionPositionsInChunk
(long pos) getExistingSectionsInChunk
(long pos) getOrCreateSection
(long sectionPos) getSection
(long sectionPos) void
remove
(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()
-