Package net.minecraft.util.palette
Class PalettedContainer<T>
java.lang.Object
net.minecraft.util.palette.PalettedContainer<T>
- All Implemented Interfaces:
IResizeCallback<T>
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private final T
private final IResizeCallback<T>
private final ReentrantLock
private final Function<CompoundNBT,
T> private final ObjectIntIdentityMap<T>
protected BitArray
private final Function<T,
CompoundNBT> -
Constructor Summary
ConstructorDescriptionPalettedContainer
(IPalette<T> p_i48961_1_, ObjectIntIdentityMap<T> p_i48961_2_, Function<CompoundNBT, T> p_i48961_3_, Function<T, CompoundNBT> p_i48961_4_, T p_i48961_5_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
acquire()
void
count
(PalettedContainer.ICountConsumer<T> p_225497_1_) protected T
get
(int p_186015_1_) get
(int p_186016_1_, int p_186016_2_, int p_186016_3_) protected T
getAndSetUnchecked
(int p_222639_1_, int p_222639_2_, int p_222639_3_, T p_222639_4_) private static int
getIndex
(int p_186011_0_, int p_186011_1_, int p_186011_2_) int
boolean
int
void
void
read
(PacketBuffer p_186010_1_) void
release()
protected void
private void
setBits
(int p_186012_1_) private void
setBits
(int bitsIn, boolean forceBits) void
write
(CompoundNBT p_196963_1_, String p_196963_2_, String p_196963_3_) void
write
(PacketBuffer p_186009_1_)
-
Field Details
-
globalPalette
-
dummyPaletteResize
-
registry
-
reader
-
writer
-
defaultValue
-
storage
-
palette
-
bits
private int bits -
lock
-
-
Constructor Details
-
PalettedContainer
public PalettedContainer(IPalette<T> p_i48961_1_, ObjectIntIdentityMap<T> p_i48961_2_, Function<CompoundNBT, T> p_i48961_3_, Function<T, CompoundNBT> p_i48961_4_, T p_i48961_5_)
-
-
Method Details
-
acquire
public void acquire() -
release
public void release() -
getIndex
private static int getIndex(int p_186011_0_, int p_186011_1_, int p_186011_2_) -
setBits
private void setBits(int p_186012_1_) -
setBits
private void setBits(int bitsIn, boolean forceBits) -
onResize
- Specified by:
onResize
in interfaceIResizeCallback<T>
-
getAndSet
-
getAndSetUnchecked
-
getAndSet
-
set
-
get
-
get
-
read
-
write
-
read
-
write
-
getSerializedSize
public int getSerializedSize() -
maybeHas
-
count
-