Package net.minecraft.util.collection
Interface PaletteStorage
- All Known Implementing Classes:
EmptyPaletteStorage,PackedIntegerArray
public interface PaletteStorage
A storage whose values are raw IDs held by palettes.
- Mappings:
Namespace Name named net/minecraft/util/collection/PaletteStorageintermediary net/minecraft/class_6490official axc
-
Method Summary
Modifier 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.voidset(int index, int value) Setsvaluetoindexin this storage.intswap(int index, int value) Setsvaluetoindexand returns the previous value in this storage.voidwritePaletteIndices(int[] out)
-
Method Details
-
swap
int swap(int index, int value) Setsvaluetoindexand returns the previous value in this storage.- Parameters:
index- the indexvalue- the value to set- Returns:
- the previous value
- Mappings:
Namespace Name Mixin selector named swapLnet/minecraft/util/collection/PaletteStorage;swap(II)Iintermediary method_15214Lnet/minecraft/class_6490;method_15214(II)Iofficial aLaxc;a(II)I
-
set
void set(int index, int value) Setsvaluetoindexin this storage.- Parameters:
index- the indexvalue- the value to set- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/util/collection/PaletteStorage;set(II)Vintermediary method_15210Lnet/minecraft/class_6490;method_15210(II)Vofficial bLaxc;b(II)V
-
get
int get(int index) Returns the value atindexin this storage.- Parameters:
index- the index- Returns:
- the value at
indexin this storage - Mappings:
Namespace Name Mixin selector named getLnet/minecraft/util/collection/PaletteStorage;get(I)Iintermediary method_15211Lnet/minecraft/class_6490;method_15211(I)Iofficial aLaxc;a(I)I
-
getData
long[] getData()Returns the backing data of this storage.- Returns:
- the backing data of this storage
- Mappings:
Namespace Name Mixin selector named getDataLnet/minecraft/util/collection/PaletteStorage;getData()[Jintermediary method_15212Lnet/minecraft/class_6490;method_15212()[Jofficial aLaxc;a()[J
-
getSize
int getSize()Returns the size of, or the number of elements in, this storage.- Returns:
- the size of, or the number of elements in, this storage
- Mappings:
Namespace Name Mixin selector named getSizeLnet/minecraft/util/collection/PaletteStorage;getSize()Iintermediary method_15215Lnet/minecraft/class_6490;method_15215()Iofficial bLaxc;b()I
-
getElementBits
int getElementBits()Returns the number of bits each element in this storage uses.- Returns:
- the number of bits each element in this storage uses
- Mappings:
Namespace Name Mixin selector named getElementBitsLnet/minecraft/util/collection/PaletteStorage;getElementBits()Iintermediary method_34896Lnet/minecraft/class_6490;method_34896()Iofficial cLaxc;c()I
-
forEach
Executes anactionon all values in this storage, sequentially.- Mappings:
Namespace Name Mixin selector named forEachLnet/minecraft/util/collection/PaletteStorage;forEach(Ljava/util/function/IntConsumer;)Vintermediary method_21739Lnet/minecraft/class_6490;method_21739(Ljava/util/function/IntConsumer;)Vofficial aLaxc;a(Ljava/util/function/IntConsumer;)V
-
writePaletteIndices
void writePaletteIndices(int[] out) - Mappings:
Namespace Name Mixin selector named writePaletteIndicesLnet/minecraft/util/collection/PaletteStorage;writePaletteIndices([I)Vintermediary method_39892Lnet/minecraft/class_6490;method_39892([I)Vofficial aLaxc;a([I)V
-
copy
PaletteStorage copy()- Mappings:
Namespace Name Mixin selector named copyLnet/minecraft/util/collection/PaletteStorage;copy()Lnet/minecraft/util/collection/PaletteStorage;intermediary method_39939Lnet/minecraft/class_6490;method_39939()Lnet/minecraft/class_6490;official dLaxc;d()Laxc;
-