类 PackedIntegerArray


  • public class PackedIntegerArray
    extends Object
    Mappings:
    Namespace Name
    official afy
    intermediary net/minecraft/class_3508
    named net/minecraft/util/collection/PackedIntegerArray
    • 字段详细资料

      • INDEX_PARAMETERS

        private static final int[] INDEX_PARAMETERS
        Magic constants for faster integer division by a constant.

        This is computed as (n * scale + offset) >> (32 + shift). For a divisor n, the constants are stored as such:

        • scale at 3 * (n - 1)
        • offset at 3 * (n - 1) + 1
        • shift at 3 * (n - 1) + 2
        Mappings:
        Namespace Name Mixin selector
        official a Lafy;a:[I
        intermediary field_24078 Lnet/minecraft/class_3508;field_24078:[I
        named INDEX_PARAMETERS Lnet/minecraft/util/collection/PackedIntegerArray;INDEX_PARAMETERS:[I
      • storage

        private final long[] storage
        Mappings:
        Namespace Name Mixin selector
        official b Lafy;b:[J
        intermediary field_15631 Lnet/minecraft/class_3508;field_15631:[J
        named storage Lnet/minecraft/util/collection/PackedIntegerArray;storage:[J
      • elementBits

        private final int elementBits
        Mappings:
        Namespace Name Mixin selector
        official c Lafy;c:I
        intermediary field_15633 Lnet/minecraft/class_3508;field_15633:I
        named elementBits Lnet/minecraft/util/collection/PackedIntegerArray;elementBits:I
      • maxValue

        private final long maxValue
        Mappings:
        Namespace Name Mixin selector
        official d Lafy;d:J
        intermediary field_15634 Lnet/minecraft/class_3508;field_15634:J
        named maxValue Lnet/minecraft/util/collection/PackedIntegerArray;maxValue:J
      • size

        private final int size
        Mappings:
        Namespace Name Mixin selector
        official e Lafy;e:I
        intermediary field_15632 Lnet/minecraft/class_3508;field_15632:I
        named size Lnet/minecraft/util/collection/PackedIntegerArray;size:I
      • elementsPerLong

        private final int elementsPerLong
        Mappings:
        Namespace Name Mixin selector
        official f Lafy;f:I
        intermediary field_24079 Lnet/minecraft/class_3508;field_24079:I
        named elementsPerLong Lnet/minecraft/util/collection/PackedIntegerArray;elementsPerLong:I
      • indexScale

        private final int indexScale
        Mappings:
        Namespace Name Mixin selector
        official g Lafy;g:I
        intermediary field_24080 Lnet/minecraft/class_3508;field_24080:I
        named indexScale Lnet/minecraft/util/collection/PackedIntegerArray;indexScale:I
      • indexOffset

        private final int indexOffset
        Mappings:
        Namespace Name Mixin selector
        official h Lafy;h:I
        intermediary field_24081 Lnet/minecraft/class_3508;field_24081:I
        named indexOffset Lnet/minecraft/util/collection/PackedIntegerArray;indexOffset:I
      • indexShift

        private final int indexShift
        Mappings:
        Namespace Name Mixin selector
        official i Lafy;i:I
        intermediary field_24082 Lnet/minecraft/class_3508;field_24082:I
        named indexShift Lnet/minecraft/util/collection/PackedIntegerArray;indexShift:I
    • 构造器详细资料

      • PackedIntegerArray

        public PackedIntegerArray​(int elementBits,
                                  int size)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lafy;<init>(II)V
        intermediary <init> Lnet/minecraft/class_3508;<init>(II)V
        named <init> Lnet/minecraft/util/collection/PackedIntegerArray;<init>(II)V
      • PackedIntegerArray

        public PackedIntegerArray​(int elementBits,
                                  int size,
                                  @Nullable
                                  @org.jetbrains.annotations.Nullable long[] storage)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lafy;<init>(II[J)V
        intermediary <init> Lnet/minecraft/class_3508;<init>(II[J)V
        named <init> Lnet/minecraft/util/collection/PackedIntegerArray;<init>(II[J)V
    • 方法详细资料

      • getStorageIndex

        private int getStorageIndex​(int index)
        Mappings:
        Namespace Name Mixin selector
        official b Lafy;b(I)I
        intermediary method_27284 Lnet/minecraft/class_3508;method_27284(I)I
        named getStorageIndex Lnet/minecraft/util/collection/PackedIntegerArray;getStorageIndex(I)I
      • setAndGetOldValue

        public int setAndGetOldValue​(int index,
                                     int value)
        Mappings:
        Namespace Name Mixin selector
        official a Lafy;a(II)I
        intermediary method_15214 Lnet/minecraft/class_3508;method_15214(II)I
        named setAndGetOldValue Lnet/minecraft/util/collection/PackedIntegerArray;setAndGetOldValue(II)I
      • set

        public void set​(int index,
                        int value)
        Mappings:
        Namespace Name Mixin selector
        official b Lafy;b(II)V
        intermediary method_15210 Lnet/minecraft/class_3508;method_15210(II)V
        named set Lnet/minecraft/util/collection/PackedIntegerArray;set(II)V
      • get

        public int get​(int index)
        Mappings:
        Namespace Name Mixin selector
        official a Lafy;a(I)I
        intermediary method_15211 Lnet/minecraft/class_3508;method_15211(I)I
        named get Lnet/minecraft/util/collection/PackedIntegerArray;get(I)I
      • getStorage

        public long[] getStorage()
        Mappings:
        Namespace Name Mixin selector
        official a Lafy;a()[J
        intermediary method_15212 Lnet/minecraft/class_3508;method_15212()[J
        named getStorage Lnet/minecraft/util/collection/PackedIntegerArray;getStorage()[J
      • getSize

        public int getSize()
        Mappings:
        Namespace Name Mixin selector
        official b Lafy;b()I
        intermediary method_15215 Lnet/minecraft/class_3508;method_15215()I
        named getSize Lnet/minecraft/util/collection/PackedIntegerArray;getSize()I
      • getElementBits

        public int getElementBits()
        Mappings:
        Namespace Name Mixin selector
        official c Lafy;c()I
        intermediary method_34896 Lnet/minecraft/class_3508;method_34896()I
        named getElementBits Lnet/minecraft/util/collection/PackedIntegerArray;getElementBits()I
      • forEach

        public void forEach​(IntConsumer consumer)
        Mappings:
        Namespace Name Mixin selector
        official a Lafy;a(Ljava/util/function/IntConsumer;)V
        intermediary method_21739 Lnet/minecraft/class_3508;method_21739(Ljava/util/function/IntConsumer;)V
        named forEach Lnet/minecraft/util/collection/PackedIntegerArray;forEach(Ljava/util/function/IntConsumer;)V