类 SectionedEntityCache<T extends EntityLike>


  • public class SectionedEntityCache<T extends EntityLike>
    extends Object
    Stores entities with the chunk sections they are in.
    另请参阅:
    EntityTrackingSection
    Mappings:
    Namespace Name
    official cng
    intermediary net/minecraft/class_5573
    named net/minecraft/world/entity/SectionedEntityCache
    • 字段详细资料

      • entityClass

        private final Class<T extends EntityLike> entityClass
        Mappings:
        Namespace Name Mixin selector
        official a Lcng;a:Ljava/lang/Class;
        intermediary field_27250 Lnet/minecraft/class_5573;field_27250:Ljava/lang/Class;
        named entityClass Lnet/minecraft/world/entity/SectionedEntityCache;entityClass:Ljava/lang/Class;
      • posToStatus

        private final Long2ObjectFunction<EntityTrackingStatus> posToStatus
        Mappings:
        Namespace Name Mixin selector
        official b Lcng;b:Lit/unimi/dsi/fastutil/longs/Long2ObjectFunction;
        intermediary field_27251 Lnet/minecraft/class_5573;field_27251:Lit/unimi/dsi/fastutil/longs/Long2ObjectFunction;
        named posToStatus Lnet/minecraft/world/entity/SectionedEntityCache;posToStatus:Lit/unimi/dsi/fastutil/longs/Long2ObjectFunction;
      • trackingSections

        private final Long2ObjectMap<EntityTrackingSection<T extends EntityLike>> trackingSections
        Mappings:
        Namespace Name Mixin selector
        official c Lcng;c:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
        intermediary field_27252 Lnet/minecraft/class_5573;field_27252:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
        named trackingSections Lnet/minecraft/world/entity/SectionedEntityCache;trackingSections:Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;
      • trackedPositions

        private final LongSortedSet trackedPositions
        Mappings:
        Namespace Name Mixin selector
        official d Lcng;d:Lit/unimi/dsi/fastutil/longs/LongSortedSet;
        intermediary field_27253 Lnet/minecraft/class_5573;field_27253:Lit/unimi/dsi/fastutil/longs/LongSortedSet;
        named trackedPositions Lnet/minecraft/world/entity/SectionedEntityCache;trackedPositions:Lit/unimi/dsi/fastutil/longs/LongSortedSet;
    • 构造器详细资料

      • SectionedEntityCache

        public SectionedEntityCache​(Class<T> entityClass,
                                    Long2ObjectFunction<EntityTrackingStatus> chunkStatusDiscriminator)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lcng;<init>(Ljava/lang/Class;Lit/unimi/dsi/fastutil/longs/Long2ObjectFunction;)V
        intermediary <init> Lnet/minecraft/class_5573;<init>(Ljava/lang/Class;Lit/unimi/dsi/fastutil/longs/Long2ObjectFunction;)V
        named <init> Lnet/minecraft/world/entity/SectionedEntityCache;<init>(Ljava/lang/Class;Lit/unimi/dsi/fastutil/longs/Long2ObjectFunction;)V
    • 方法详细资料

      • forEachInBox

        public void forEachInBox​(Box box,
                                 Consumer<EntityTrackingSection<T>> action)
        Runs the given action on each collection of entities in the chunk sections within the given box.
        Mappings:
        Namespace Name Mixin selector
        official a Lcng;a(Ldlv;Ljava/util/function/Consumer;)V
        intermediary method_31777 Lnet/minecraft/class_5573;method_31777(Lnet/minecraft/class_238;Ljava/util/function/Consumer;)V
        named forEachInBox Lnet/minecraft/world/entity/SectionedEntityCache;forEachInBox(Lnet/minecraft/util/math/Box;Ljava/util/function/Consumer;)V
      • getSections

        public LongStream getSections​(long chunkPos)
        Mappings:
        Namespace Name Mixin selector
        official a Lcng;a(J)Ljava/util/stream/LongStream;
        intermediary method_31772 Lnet/minecraft/class_5573;method_31772(J)Ljava/util/stream/LongStream;
        named getSections Lnet/minecraft/world/entity/SectionedEntityCache;getSections(J)Ljava/util/stream/LongStream;
      • getSections

        private LongSortedSet getSections​(int chunkX,
                                          int chunkZ)
        Mappings:
        Namespace Name Mixin selector
        official a Lcng;a(II)Lit/unimi/dsi/fastutil/longs/LongSortedSet;
        intermediary method_31771 Lnet/minecraft/class_5573;method_31771(II)Lit/unimi/dsi/fastutil/longs/LongSortedSet;
        named getSections Lnet/minecraft/world/entity/SectionedEntityCache;getSections(II)Lit/unimi/dsi/fastutil/longs/LongSortedSet;
      • getTrackingSections

        public Stream<EntityTrackingSection<T>> getTrackingSections​(long chunkPos)
        Mappings:
        Namespace Name Mixin selector
        official b Lcng;b(J)Ljava/util/stream/Stream;
        intermediary method_31782 Lnet/minecraft/class_5573;method_31782(J)Ljava/util/stream/Stream;
        named getTrackingSections Lnet/minecraft/world/entity/SectionedEntityCache;getTrackingSections(J)Ljava/util/stream/Stream;
      • chunkPosFromSectionPos

        private static long chunkPosFromSectionPos​(long sectionPos)
        Mappings:
        Namespace Name Mixin selector
        official f Lcng;f(J)J
        intermediary method_31787 Lnet/minecraft/class_5573;method_31787(J)J
        named chunkPosFromSectionPos Lnet/minecraft/world/entity/SectionedEntityCache;chunkPosFromSectionPos(J)J
      • getTrackingSection

        public EntityTrackingSection<T> getTrackingSection​(long sectionPos)
        Mappings:
        Namespace Name Mixin selector
        official c Lcng;c(J)Lcnf;
        intermediary method_31784 Lnet/minecraft/class_5573;method_31784(J)Lnet/minecraft/class_5572;
        named getTrackingSection Lnet/minecraft/world/entity/SectionedEntityCache;getTrackingSection(J)Lnet/minecraft/world/entity/EntityTrackingSection;
      • findTrackingSection

        @Nullable
        public @Nullable EntityTrackingSection<T> findTrackingSection​(long sectionPos)
        Mappings:
        Namespace Name Mixin selector
        official d Lcng;d(J)Lcnf;
        intermediary method_31785 Lnet/minecraft/class_5573;method_31785(J)Lnet/minecraft/class_5572;
        named findTrackingSection Lnet/minecraft/world/entity/SectionedEntityCache;findTrackingSection(J)Lnet/minecraft/world/entity/EntityTrackingSection;
      • addSection

        private EntityTrackingSection<T> addSection​(long sectionPos)
        Mappings:
        Namespace Name Mixin selector
        official g Lcng;g(J)Lcnf;
        intermediary method_31788 Lnet/minecraft/class_5573;method_31788(J)Lnet/minecraft/class_5572;
        named addSection Lnet/minecraft/world/entity/SectionedEntityCache;addSection(J)Lnet/minecraft/world/entity/EntityTrackingSection;
      • getChunkPositions

        public LongSet getChunkPositions()
        Mappings:
        Namespace Name Mixin selector
        official a Lcng;a()Lit/unimi/dsi/fastutil/longs/LongSet;
        intermediary method_31770 Lnet/minecraft/class_5573;method_31770()Lit/unimi/dsi/fastutil/longs/LongSet;
        named getChunkPositions Lnet/minecraft/world/entity/SectionedEntityCache;getChunkPositions()Lit/unimi/dsi/fastutil/longs/LongSet;
      • intersecting

        private static <T extends EntityLike> Predicate<T> intersecting​(Box box)
        Mappings:
        Namespace Name Mixin selector
        official a Lcng;a(Ldlv;)Ljava/util/function/Predicate;
        intermediary method_31775 Lnet/minecraft/class_5573;method_31775(Lnet/minecraft/class_238;)Ljava/util/function/Predicate;
        named intersecting Lnet/minecraft/world/entity/SectionedEntityCache;intersecting(Lnet/minecraft/util/math/Box;)Ljava/util/function/Predicate;
      • forEachIntersects

        public void forEachIntersects​(Box box,
                                      Consumer<T> action)
        Mappings:
        Namespace Name Mixin selector
        official b Lcng;b(Ldlv;Ljava/util/function/Consumer;)V
        intermediary method_31783 Lnet/minecraft/class_5573;method_31783(Lnet/minecraft/class_238;Ljava/util/function/Consumer;)V
        named forEachIntersects Lnet/minecraft/world/entity/SectionedEntityCache;forEachIntersects(Lnet/minecraft/util/math/Box;Ljava/util/function/Consumer;)V
      • forEachIntersects

        public <U extends T> void forEachIntersects​(TypeFilter<T,​U> filter,
                                                    Box box,
                                                    Consumer<U> action)
        Mappings:
        Namespace Name Mixin selector
        official a Lcng;a(Lcni;Ldlv;Ljava/util/function/Consumer;)V
        intermediary method_31773 Lnet/minecraft/class_5573;method_31773(Lnet/minecraft/class_5575;Lnet/minecraft/class_238;Ljava/util/function/Consumer;)V
        named forEachIntersects Lnet/minecraft/world/entity/SectionedEntityCache;forEachIntersects(Lnet/minecraft/util/TypeFilter;Lnet/minecraft/util/math/Box;Ljava/util/function/Consumer;)V
      • removeSection

        public void removeSection​(long sectionPos)
        Mappings:
        Namespace Name Mixin selector
        official e Lcng;e(J)V
        intermediary method_31786 Lnet/minecraft/class_5573;method_31786(J)V
        named removeSection Lnet/minecraft/world/entity/SectionedEntityCache;removeSection(J)V
      • sectionCount

        public int sectionCount()
        Mappings:
        Namespace Name Mixin selector
        official b Lcng;b()I
        intermediary method_31781 Lnet/minecraft/class_5573;method_31781()I
        named sectionCount Lnet/minecraft/world/entity/SectionedEntityCache;sectionCount()I