Package net.minecraft.util.collection
Class EmptyPaletteStorage
java.lang.Object
net.minecraft.util.collection.EmptyPaletteStorage
- All Implemented Interfaces:
PaletteStorage
An empty palette storage has a size, but all its elements are 0.
- Mappings:
Namespace Name official aqbintermediary net/minecraft/class_6502named net/minecraft/util/collection/EmptyPaletteStorage
-
Field Summary
Fields -
Constructor Summary
Constructors -
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)
-
Field Details
-
EMPTY_DATA
public static final long[] EMPTY_DATA- Mappings:
Namespace Name Mixin selector official aLaqb;a:[Jintermediary field_34401Lnet/minecraft/class_6502;field_34401:[Jnamed EMPTY_DATALnet/minecraft/util/collection/EmptyPaletteStorage;EMPTY_DATA:[J
-
size
private final int size- Mappings:
Namespace Name Mixin selector official bLaqb;b:Iintermediary field_34402Lnet/minecraft/class_6502;field_34402:Inamed sizeLnet/minecraft/util/collection/EmptyPaletteStorage;size:I
-
-
Constructor Details
-
EmptyPaletteStorage
public EmptyPaletteStorage(int size) - Mappings:
Namespace Name Mixin selector official <init>Laqb;<init>(I)Vintermediary <init>Lnet/minecraft/class_6502;<init>(I)Vnamed <init>Lnet/minecraft/util/collection/EmptyPaletteStorage;<init>(I)V
-
-
Method Details
-
swap
public int swap(int index, int value) Setsvaluetoindexand returns the previous value in this storage.- Specified by:
swapin interfacePaletteStorage- Parameters:
index- the indexvalue- the value to set- Returns:
- the previous value
- Mappings:
Namespace Name Mixin selector official aLans;a(II)Iintermediary method_15214Lnet/minecraft/class_6490;method_15214(II)Inamed swapLnet/minecraft/util/collection/PaletteStorage;swap(II)I
-
set
public void set(int index, int value) Setsvaluetoindexin this storage.- Specified by:
setin interfacePaletteStorage- Parameters:
index- the indexvalue- the value to set- Mappings:
Namespace Name Mixin selector official bLans;b(II)Vintermediary method_15210Lnet/minecraft/class_6490;method_15210(II)Vnamed setLnet/minecraft/util/collection/PaletteStorage;set(II)V
-
get
public int get(int index) Returns the value atindexin this storage.- Specified by:
getin interfacePaletteStorage- Parameters:
index- the index- Returns:
- the value at
indexin this storage - Mappings:
Namespace Name Mixin selector official aLans;a(I)Iintermediary method_15211Lnet/minecraft/class_6490;method_15211(I)Inamed getLnet/minecraft/util/collection/PaletteStorage;get(I)I
-
getData
public long[] getData()Returns the backing data of this storage.- Specified by:
getDatain interfacePaletteStorage- Returns:
- the backing data of this storage
- Mappings:
Namespace Name Mixin selector official aLans;a()[Jintermediary method_15212Lnet/minecraft/class_6490;method_15212()[Jnamed getDataLnet/minecraft/util/collection/PaletteStorage;getData()[J
-
getSize
public int getSize()Returns the size of, or the number of elements in, this storage.- Specified by:
getSizein interfacePaletteStorage- Returns:
- the size of, or the number of elements in, this storage
- Mappings:
Namespace Name Mixin selector official bLans;b()Iintermediary method_15215Lnet/minecraft/class_6490;method_15215()Inamed getSizeLnet/minecraft/util/collection/PaletteStorage;getSize()I
-
getElementBits
public int getElementBits()Returns the number of bits each element in this storage uses.- Specified by:
getElementBitsin interfacePaletteStorage- Returns:
- the number of bits each element in this storage uses
- Mappings:
Namespace Name Mixin selector official cLans;c()Iintermediary method_34896Lnet/minecraft/class_6490;method_34896()Inamed getElementBitsLnet/minecraft/util/collection/PaletteStorage;getElementBits()I
-
forEach
Executes anactionon all values in this storage, sequentially.- Specified by:
forEachin interfacePaletteStorage- Mappings:
Namespace Name Mixin selector official aLans;a(Ljava/util/function/IntConsumer;)Vintermediary method_21739Lnet/minecraft/class_6490;method_21739(Ljava/util/function/IntConsumer;)Vnamed forEachLnet/minecraft/util/collection/PaletteStorage;forEach(Ljava/util/function/IntConsumer;)V
-
writePaletteIndices
public void writePaletteIndices(int[] out) - Specified by:
writePaletteIndicesin interfacePaletteStorage- Mappings:
Namespace Name Mixin selector official aLans;a([I)Vintermediary method_39892Lnet/minecraft/class_6490;method_39892([I)Vnamed writePaletteIndicesLnet/minecraft/util/collection/PaletteStorage;writePaletteIndices([I)V
-
copy
- Specified by:
copyin interfacePaletteStorage- Mappings:
Namespace Name Mixin selector official dLans;d()Lans;intermediary method_39939Lnet/minecraft/class_6490;method_39939()Lnet/minecraft/class_6490;named copyLnet/minecraft/util/collection/PaletteStorage;copy()Lnet/minecraft/util/collection/PaletteStorage;
-