Package net.minecraft.util.collection
Class PackedIntegerArray
java.lang.Object
net.minecraft.util.collection.PackedIntegerArray
- All Implemented Interfaces:
- PaletteStorage
- Mappings:
- Namespace - Name - named - net/minecraft/util/collection/PackedIntegerArray- intermediary - net/minecraft/class_3508- official - azo
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final long[]private final intprivate final intprivate static final int[]Magic constants for faster integer division by a constant.private final intprivate final intprivate final intprivate final longprivate final int
- 
Constructor SummaryConstructorsConstructorDescriptionPackedIntegerArray(int elementBits, int size) PackedIntegerArray(int elementBits, int size, @org.jetbrains.annotations.Nullable long[] data) PackedIntegerArray(int elementBits, int size, int[] data) 
- 
Method SummaryModifier and TypeMethodDescriptioncopy()voidforEach(IntConsumer action) Executes anactionon all values in this storage, sequentially.intget(int index) Returns the value atindexin this storage.long[]getData()Returns the backing data of this storage.intReturns the number of bits each element in this storage uses.intgetSize()Returns the size of, or the number of elements in, this storage.private intgetStorageIndex(int index) voidset(int index, int value) Setsvaluetoindexin this storage.intswap(int index, int value) Setsvaluetoindexand returns the previous value in this storage.voidwritePaletteIndices(int[] out) 
- 
Field Details- 
INDEX_PARAMETERSprivate static final int[] INDEX_PARAMETERSMagic 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 - named - INDEX_PARAMETERS- Lnet/minecraft/util/collection/PackedIntegerArray;INDEX_PARAMETERS:[I- intermediary - field_24078- Lnet/minecraft/class_3508;field_24078:[I- official - a- Lazo;a:[I
 
- 
dataprivate final long[] data- Mappings:
- Namespace - Name - Mixin selector - named - data- Lnet/minecraft/util/collection/PackedIntegerArray;data:[J- intermediary - field_15631- Lnet/minecraft/class_3508;field_15631:[J- official - b- Lazo;b:[J
 
- 
elementBitsprivate final int elementBits- Mappings:
- Namespace - Name - Mixin selector - named - elementBits- Lnet/minecraft/util/collection/PackedIntegerArray;elementBits:I- intermediary - field_15633- Lnet/minecraft/class_3508;field_15633:I- official - c- Lazo;c:I
 
- 
maxValueprivate final long maxValue- Mappings:
- Namespace - Name - Mixin selector - named - maxValue- Lnet/minecraft/util/collection/PackedIntegerArray;maxValue:J- intermediary - field_15634- Lnet/minecraft/class_3508;field_15634:J- official - d- Lazo;d:J
 
- 
sizeprivate final int size- Mappings:
- Namespace - Name - Mixin selector - named - size- Lnet/minecraft/util/collection/PackedIntegerArray;size:I- intermediary - field_15632- Lnet/minecraft/class_3508;field_15632:I- official - e- Lazo;e:I
 
- 
elementsPerLongprivate final int elementsPerLong- Mappings:
- Namespace - Name - Mixin selector - named - elementsPerLong- Lnet/minecraft/util/collection/PackedIntegerArray;elementsPerLong:I- intermediary - field_24079- Lnet/minecraft/class_3508;field_24079:I- official - f- Lazo;f:I
 
- 
indexScaleprivate final int indexScale- Mappings:
- Namespace - Name - Mixin selector - named - indexScale- Lnet/minecraft/util/collection/PackedIntegerArray;indexScale:I- intermediary - field_24080- Lnet/minecraft/class_3508;field_24080:I- official - g- Lazo;g:I
 
- 
indexOffsetprivate final int indexOffset- Mappings:
- Namespace - Name - Mixin selector - named - indexOffset- Lnet/minecraft/util/collection/PackedIntegerArray;indexOffset:I- intermediary - field_24081- Lnet/minecraft/class_3508;field_24081:I- official - h- Lazo;h:I
 
- 
indexShiftprivate final int indexShift- Mappings:
- Namespace - Name - Mixin selector - named - indexShift- Lnet/minecraft/util/collection/PackedIntegerArray;indexShift:I- intermediary - field_24082- Lnet/minecraft/class_3508;field_24082:I- official - i- Lazo;i:I
 
 
- 
- 
Constructor Details- 
PackedIntegerArraypublic PackedIntegerArray(int elementBits, int size, int[] data) - Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/util/collection/PackedIntegerArray;<init>(II[I)V- intermediary - <init>- Lnet/minecraft/class_3508;<init>(II[I)V- official - <init>- Lazo;<init>(II[I)V
 
- 
PackedIntegerArraypublic PackedIntegerArray(int elementBits, int size) - Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/util/collection/PackedIntegerArray;<init>(II)V- intermediary - <init>- Lnet/minecraft/class_3508;<init>(II)V- official - <init>- Lazo;<init>(II)V
 
- 
PackedIntegerArraypublic PackedIntegerArray(int elementBits, int size, @Nullable @org.jetbrains.annotations.Nullable long[] data) - Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/util/collection/PackedIntegerArray;<init>(II[J)V- intermediary - <init>- Lnet/minecraft/class_3508;<init>(II[J)V- official - <init>- Lazo;<init>(II[J)V
 
 
- 
- 
Method Details- 
getStorageIndexprivate int getStorageIndex(int index) - Mappings:
- Namespace - Name - Mixin selector - named - getStorageIndex- Lnet/minecraft/util/collection/PackedIntegerArray;getStorageIndex(I)I- intermediary - method_27284- Lnet/minecraft/class_3508;method_27284(I)I- official - b- Lazo;b(I)I
 
- 
swappublic int swap(int index, int value) Setsvaluetoindexand returns the previous value in this storage.- Specified by:
- swapin interface- PaletteStorage
- Parameters:
- index- the index
- value- the value to set
- Returns:
- the previous value
- Mappings:
- Namespace - Name - Mixin selector - named - swap- Lnet/minecraft/util/collection/PaletteStorage;swap(II)I- intermediary - method_15214- Lnet/minecraft/class_6490;method_15214(II)I- official - a- Laxo;a(II)I
 
- 
setpublic void set(int index, int value) Setsvaluetoindexin this storage.- Specified by:
- setin interface- PaletteStorage
- Parameters:
- index- the index
- value- the value to set
- Mappings:
- Namespace - Name - Mixin selector - named - set- Lnet/minecraft/util/collection/PaletteStorage;set(II)V- intermediary - method_15210- Lnet/minecraft/class_6490;method_15210(II)V- official - b- Laxo;b(II)V
 
- 
getpublic int get(int index) Returns the value atindexin this storage.- Specified by:
- getin interface- PaletteStorage
- Parameters:
- index- the index
- Returns:
- the value at indexin this storage
- Mappings:
- Namespace - Name - Mixin selector - named - get- Lnet/minecraft/util/collection/PaletteStorage;get(I)I- intermediary - method_15211- Lnet/minecraft/class_6490;method_15211(I)I- official - a- Laxo;a(I)I
 
- 
getDatapublic long[] getData()Returns the backing data of this storage.- Specified by:
- getDatain interface- PaletteStorage
- Returns:
- the backing data of this storage
- Mappings:
- Namespace - Name - Mixin selector - named - getData- Lnet/minecraft/util/collection/PaletteStorage;getData()[J- intermediary - method_15212- Lnet/minecraft/class_6490;method_15212()[J- official - a- Laxo;a()[J
 
- 
getSizepublic int getSize()Returns the size of, or the number of elements in, this storage.- Specified by:
- getSizein interface- PaletteStorage
- Returns:
- the size of, or the number of elements in, this storage
- Mappings:
- Namespace - Name - Mixin selector - named - getSize- Lnet/minecraft/util/collection/PaletteStorage;getSize()I- intermediary - method_15215- Lnet/minecraft/class_6490;method_15215()I- official - b- Laxo;b()I
 
- 
getElementBitspublic int getElementBits()Returns the number of bits each element in this storage uses.- Specified by:
- getElementBitsin interface- PaletteStorage
- Returns:
- the number of bits each element in this storage uses
- Mappings:
- Namespace - Name - Mixin selector - named - getElementBits- Lnet/minecraft/util/collection/PaletteStorage;getElementBits()I- intermediary - method_34896- Lnet/minecraft/class_6490;method_34896()I- official - c- Laxo;c()I
 
- 
forEachExecutes anactionon all values in this storage, sequentially.- Specified by:
- forEachin interface- PaletteStorage
- Mappings:
- Namespace - Name - Mixin selector - named - forEach- Lnet/minecraft/util/collection/PaletteStorage;forEach(Ljava/util/function/IntConsumer;)V- intermediary - method_21739- Lnet/minecraft/class_6490;method_21739(Ljava/util/function/IntConsumer;)V- official - a- Laxo;a(Ljava/util/function/IntConsumer;)V
 
- 
writePaletteIndicespublic void writePaletteIndices(int[] out) - Specified by:
- writePaletteIndicesin interface- PaletteStorage
- Mappings:
- Namespace - Name - Mixin selector - named - writePaletteIndices- Lnet/minecraft/util/collection/PaletteStorage;writePaletteIndices([I)V- intermediary - method_39892- Lnet/minecraft/class_6490;method_39892([I)V- official - a- Laxo;a([I)V
 
- 
copy- Specified by:
- copyin interface- PaletteStorage
- Mappings:
- Namespace - Name - Mixin selector - named - copy- Lnet/minecraft/util/collection/PaletteStorage;copy()Lnet/minecraft/util/collection/PaletteStorage;- intermediary - method_39939- Lnet/minecraft/class_6490;method_39939()Lnet/minecraft/class_6490;- official - d- Laxo;d()Laxo;
 
 
-