Package net.minecraft.world.level.entity
Class EntitySectionStorage<T extends EntityAccess>
java.lang.Object
net.minecraft.world.level.entity.EntitySectionStorage<T>
-
Field Summary
Modifier 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
ConstructorDescriptionEntitySectionStorage
(Class<T> p_156855_, it.unimi.dsi.fastutil.longs.Long2ObjectFunction<Visibility> p_156856_) -
Method Summary
Modifier and TypeMethodDescriptionint
count()
private EntitySection<T>
createSection
(long p_156902_) void
forEachAccessibleNonEmptySection
(AABB p_188363_, Consumer<EntitySection<T>> p_188364_) it.unimi.dsi.fastutil.longs.LongSet
private static long
getChunkKeyFromSectionKey
(long p_156900_) private it.unimi.dsi.fastutil.longs.LongSortedSet
getChunkSections
(int p_156859_, int p_156860_) <U extends T>
voidgetEntities
(EntityTypeTest<T, U> p_156864_, AABB p_156865_, Consumer<U> p_156866_) void
getEntities
(AABB p_156891_, Consumer<T> p_156892_) getExistingSectionPositionsInChunk
(long p_156862_) getExistingSectionsInChunk
(long p_156889_) getOrCreateSection
(long p_156894_) getSection
(long p_156896_) void
remove
(long p_156898_)
-
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> p_156855_, it.unimi.dsi.fastutil.longs.Long2ObjectFunction<Visibility> p_156856_)
-
-
Method Details
-
forEachAccessibleNonEmptySection
-
getExistingSectionPositionsInChunk
-
getChunkSections
private it.unimi.dsi.fastutil.longs.LongSortedSet getChunkSections(int p_156859_, int p_156860_) -
getExistingSectionsInChunk
-
getChunkKeyFromSectionKey
private static long getChunkKeyFromSectionKey(long p_156900_) -
getOrCreateSection
-
getSection
-
createSection
-
getAllChunksWithExistingSections
public it.unimi.dsi.fastutil.longs.LongSet getAllChunksWithExistingSections() -
getEntities
-
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()
-