Class EntitySectionStorage<T extends EntityAccess>
java.lang.Object
net.minecraft.world.level.entity.EntitySectionStorage<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate final it.unimi.dsi.fastutil.longs.Long2ObjectFunction<Visibility> static final intprivate 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> intialSectionVisibility) -
Method Summary
Modifier and TypeMethodDescriptionintcount()private EntitySection<T> createSection(long sectionPos) voidit.unimi.dsi.fastutil.longs.LongSetprivate static longgetChunkKeyFromSectionKey(long sectionPos) private it.unimi.dsi.fastutil.longs.LongSortedSetgetChunkSections(int x, int z) <U extends T>
voidgetEntities(EntityTypeTest<T, U> type, AABB bb, AbortableIterationConsumer<U> consumer) voidgetEntities(AABB bb, AbortableIterationConsumer<T> output) getExistingSectionPositionsInChunk(long chunkKey) getExistingSectionsInChunk(long chunkKey) getOrCreateSection(long key) @Nullable EntitySection<T> getSection(long key) voidremove(long sectionKey)
-
Field Details
-
CHONKY_ENTITY_SEARCH_GRACE
public static final int CHONKY_ENTITY_SEARCH_GRACE- See Also:
-
MAX_NON_CHONKY_ENTITY_SIZE
public static final int MAX_NON_CHONKY_ENTITY_SIZE- See Also:
-
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> intialSectionVisibility)
-
-
Method Details
-
forEachAccessibleNonEmptySection
public void forEachAccessibleNonEmptySection(AABB bb, AbortableIterationConsumer<EntitySection<T>> output) -
getExistingSectionPositionsInChunk
-
getChunkSections
private it.unimi.dsi.fastutil.longs.LongSortedSet getChunkSections(int x, int z) -
getExistingSectionsInChunk
-
getChunkKeyFromSectionKey
private static long getChunkKeyFromSectionKey(long sectionPos) -
getOrCreateSection
-
getSection
-
createSection
-
getAllChunksWithExistingSections
public it.unimi.dsi.fastutil.longs.LongSet getAllChunksWithExistingSections() -
getEntities
-
getEntities
public <U extends T> void getEntities(EntityTypeTest<T, U> type, AABB bb, AbortableIterationConsumer<U> consumer) -
remove
public void remove(long sectionKey) -
count
public int count()
-