Package net.minecraft.util.palette
Class ArrayPalette<T>
- java.lang.Object
-
- net.minecraft.util.palette.ArrayPalette<T>
-
-
Field Summary
Fields Modifier and Type Field Description private int
bits
private java.util.function.Function<CompoundNBT,T>
reader
private ObjectIntIdentityMap<T>
registry
private IResizeCallback<T>
resizeHandler
private int
size
private T[]
values
-
Constructor Summary
Constructors Constructor Description ArrayPalette(ObjectIntIdentityMap<T> p_i48962_1_, int p_i48962_2_, IResizeCallback<T> p_i48962_3_, java.util.function.Function<CompoundNBT,T> p_i48962_4_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getSerializedSize()
int
getSize()
int
idFor(T p_186041_1_)
boolean
maybeHas(java.util.function.Predicate<T> p_230341_1_)
void
read(ListNBT p_196968_1_)
void
read(PacketBuffer p_186038_1_)
T
valueFor(int p_186039_1_)
void
write(PacketBuffer p_186037_1_)
-
-
-
Field Detail
-
registry
private final ObjectIntIdentityMap<T> registry
-
values
private final T[] values
-
resizeHandler
private final IResizeCallback<T> resizeHandler
-
reader
private final java.util.function.Function<CompoundNBT,T> reader
-
bits
private final int bits
-
size
private int size
-
-
Constructor Detail
-
ArrayPalette
public ArrayPalette(ObjectIntIdentityMap<T> p_i48962_1_, int p_i48962_2_, IResizeCallback<T> p_i48962_3_, java.util.function.Function<CompoundNBT,T> p_i48962_4_)
-
-
Method Detail
-
maybeHas
public boolean maybeHas(java.util.function.Predicate<T> p_230341_1_)
-
valueFor
@Nullable public T valueFor(int p_186039_1_)
-
read
public void read(PacketBuffer p_186038_1_)
-
write
public void write(PacketBuffer p_186037_1_)
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfaceIPalette<T>
-
getSize
public int getSize()
-
-