Package net.minecraft.world.entity
Class SectionedEntityCache<T extends EntityLike>
java.lang.Object
net.minecraft.world.entity.SectionedEntityCache<T>
Stores entities with the chunk sections they are in.
- See Also:
- Mappings:
Namespace Name named net/minecraft/world/entity/SectionedEntityCacheintermediary net/minecraft/class_5573official dxl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Long2ObjectFunction<EntityTrackingStatus> private final LongSortedSetprivate final Long2ObjectMap<EntityTrackingSection<T>> -
Constructor Summary
ConstructorsConstructorDescriptionSectionedEntityCache(Class<T> entityClass, Long2ObjectFunction<EntityTrackingStatus> chunkStatusDiscriminator) -
Method Summary
Modifier and TypeMethodDescriptionprivate EntityTrackingSection<T> addSection(long sectionPos) private static longchunkPosFromSectionPos(long sectionPos) findTrackingSection(long sectionPos) voidforEachInBox(Box box, LazyIterationConsumer<EntityTrackingSection<T>> consumer) Runs the given action on each collection of entities in the chunk sections within the given box.voidforEachIntersects(Box box, LazyIterationConsumer<T> consumer) <U extends T>
voidforEachIntersects(TypeFilter<T, U> filter, Box box, LazyIterationConsumer<U> consumer) private LongSortedSetgetSections(int chunkX, int chunkZ) getSections(long chunkPos) getTrackingSection(long sectionPos) getTrackingSections(long chunkPos) voidremoveSection(long sectionPos) int
-
Field Details
-
entityClass
- Mappings:
Namespace Name Mixin selector named entityClassLnet/minecraft/world/entity/SectionedEntityCache;entityClass:Ljava/lang/Class;intermediary field_27250Lnet/minecraft/class_5573;field_27250:Ljava/lang/Class;official aLdxl;a:Ljava/lang/Class;
-
posToStatus
- Mappings:
Namespace Name Mixin selector named posToStatusLnet/minecraft/world/entity/SectionedEntityCache;posToStatus:Lit/unimi/dsi/fastutil/longs/Long2ObjectFunction;intermediary field_27251Lnet/minecraft/class_5573;field_27251:Lit/unimi/dsi/fastutil/longs/Long2ObjectFunction;official bLdxl;b:Lit/unimi/dsi/fastutil/longs/Long2ObjectFunction;
-
trackingSections
- Mappings:
Namespace Name Mixin selector named trackingSectionsLnet/minecraft/world/entity/SectionedEntityCache;trackingSections:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;intermediary field_27252Lnet/minecraft/class_5573;field_27252:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;official cLdxl;c:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
-
trackedPositions
- Mappings:
Namespace Name Mixin selector named trackedPositionsLnet/minecraft/world/entity/SectionedEntityCache;trackedPositions:Lit/unimi/dsi/fastutil/longs/LongSortedSet;intermediary field_27253Lnet/minecraft/class_5573;field_27253:Lit/unimi/dsi/fastutil/longs/LongSortedSet;official dLdxl;d:Lit/unimi/dsi/fastutil/longs/LongSortedSet;
-
-
Constructor Details
-
SectionedEntityCache
public SectionedEntityCache(Class<T> entityClass, Long2ObjectFunction<EntityTrackingStatus> chunkStatusDiscriminator) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/world/entity/SectionedEntityCache;<init>(Ljava/lang/Class;Lit/unimi/dsi/fastutil/longs/Long2ObjectFunction;)Vintermediary <init>Lnet/minecraft/class_5573;<init>(Ljava/lang/Class;Lit/unimi/dsi/fastutil/longs/Long2ObjectFunction;)Vofficial <init>Ldxl;<init>(Ljava/lang/Class;Lit/unimi/dsi/fastutil/longs/Long2ObjectFunction;)V
-
-
Method Details
-
forEachInBox
Runs the given action on each collection of entities in the chunk sections within the given box.- Mappings:
Namespace Name Mixin selector named forEachInBoxLnet/minecraft/world/entity/SectionedEntityCache;forEachInBox(Lnet/minecraft/util/math/Box;Lnet/minecraft/util/function/LazyIterationConsumer;)Vintermediary method_31777Lnet/minecraft/class_5573;method_31777(Lnet/minecraft/class_238;Lnet/minecraft/class_7927;)Vofficial aLdxl;a(Lewx;Laxa;)V
-
getSections
- Mappings:
Namespace Name Mixin selector named getSectionsLnet/minecraft/world/entity/SectionedEntityCache;getSections(J)Ljava/util/stream/LongStream;intermediary method_31772Lnet/minecraft/class_5573;method_31772(J)Ljava/util/stream/LongStream;official aLdxl;a(J)Ljava/util/stream/LongStream;
-
getSections
- Mappings:
Namespace Name Mixin selector named getSectionsLnet/minecraft/world/entity/SectionedEntityCache;getSections(II)Lit/unimi/dsi/fastutil/longs/LongSortedSet;intermediary method_31771Lnet/minecraft/class_5573;method_31771(II)Lit/unimi/dsi/fastutil/longs/LongSortedSet;official aLdxl;a(II)Lit/unimi/dsi/fastutil/longs/LongSortedSet;
-
getTrackingSections
- Mappings:
Namespace Name Mixin selector named getTrackingSectionsLnet/minecraft/world/entity/SectionedEntityCache;getTrackingSections(J)Ljava/util/stream/Stream;intermediary method_31782Lnet/minecraft/class_5573;method_31782(J)Ljava/util/stream/Stream;official bLdxl;b(J)Ljava/util/stream/Stream;
-
chunkPosFromSectionPos
private static long chunkPosFromSectionPos(long sectionPos) - Mappings:
Namespace Name Mixin selector named chunkPosFromSectionPosLnet/minecraft/world/entity/SectionedEntityCache;chunkPosFromSectionPos(J)Jintermediary method_31787Lnet/minecraft/class_5573;method_31787(J)Jofficial fLdxl;f(J)J
-
getTrackingSection
- Mappings:
Namespace Name Mixin selector named getTrackingSectionLnet/minecraft/world/entity/SectionedEntityCache;getTrackingSection(J)Lnet/minecraft/world/entity/EntityTrackingSection;intermediary method_31784Lnet/minecraft/class_5573;method_31784(J)Lnet/minecraft/class_5572;official cLdxl;c(J)Ldxk;
-
findTrackingSection
- Mappings:
Namespace Name Mixin selector named findTrackingSectionLnet/minecraft/world/entity/SectionedEntityCache;findTrackingSection(J)Lnet/minecraft/world/entity/EntityTrackingSection;intermediary method_31785Lnet/minecraft/class_5573;method_31785(J)Lnet/minecraft/class_5572;official dLdxl;d(J)Ldxk;
-
addSection
- Mappings:
Namespace Name Mixin selector named addSectionLnet/minecraft/world/entity/SectionedEntityCache;addSection(J)Lnet/minecraft/world/entity/EntityTrackingSection;intermediary method_31788Lnet/minecraft/class_5573;method_31788(J)Lnet/minecraft/class_5572;official gLdxl;g(J)Ldxk;
-
getChunkPositions
- Mappings:
Namespace Name Mixin selector named getChunkPositionsLnet/minecraft/world/entity/SectionedEntityCache;getChunkPositions()Lit/unimi/dsi/fastutil/longs/LongSet;intermediary method_31770Lnet/minecraft/class_5573;method_31770()Lit/unimi/dsi/fastutil/longs/LongSet;official aLdxl;a()Lit/unimi/dsi/fastutil/longs/LongSet;
-
forEachIntersects
- Mappings:
Namespace Name Mixin selector named forEachIntersectsLnet/minecraft/world/entity/SectionedEntityCache;forEachIntersects(Lnet/minecraft/util/math/Box;Lnet/minecraft/util/function/LazyIterationConsumer;)Vintermediary method_31783Lnet/minecraft/class_5573;method_31783(Lnet/minecraft/class_238;Lnet/minecraft/class_7927;)Vofficial bLdxl;b(Lewx;Laxa;)V
-
forEachIntersects
public <U extends T> void forEachIntersects(TypeFilter<T, U> filter, Box box, LazyIterationConsumer<U> consumer) - Mappings:
Namespace Name Mixin selector named forEachIntersectsLnet/minecraft/world/entity/SectionedEntityCache;forEachIntersects(Lnet/minecraft/util/TypeFilter;Lnet/minecraft/util/math/Box;Lnet/minecraft/util/function/LazyIterationConsumer;)Vintermediary method_31773Lnet/minecraft/class_5573;method_31773(Lnet/minecraft/class_5575;Lnet/minecraft/class_238;Lnet/minecraft/class_7927;)Vofficial aLdxl;a(Ldxn;Lewx;Laxa;)V
-
removeSection
public void removeSection(long sectionPos) - Mappings:
Namespace Name Mixin selector named removeSectionLnet/minecraft/world/entity/SectionedEntityCache;removeSection(J)Vintermediary method_31786Lnet/minecraft/class_5573;method_31786(J)Vofficial eLdxl;e(J)V
-
sectionCount
public int sectionCount()- Mappings:
Namespace Name Mixin selector named sectionCountLnet/minecraft/world/entity/SectionedEntityCache;sectionCount()Iintermediary method_31781Lnet/minecraft/class_5573;method_31781()Iofficial bLdxl;b()I
-