Package net.minecraft.world.level.chunk
Class PalettedContainer<T>
java.lang.Object
net.minecraft.world.level.chunk.PalettedContainer<T>
- All Implemented Interfaces:
PaletteResize<T>
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private T
private PaletteResize<T>
static int
private Semaphore
static int
private Function<CompoundTag,T>
private static int
protected BitStorage
private DebugBuffer<com.mojang.datafixers.util.Pair<Thread,StackTraceElement[]>>
private Function<T,CompoundTag>
-
Constructor Summary
ConstructorDescriptionPalettedContainer(Palette<T> p_63079_, IdMapper<T> p_63080_, Function<CompoundTag,T> p_63081_, Function<T,CompoundTag> p_63082_, T p_63083_)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acquire()
void
count(PalettedContainer.CountConsumer<T> p_63100_)
protected T
get(int p_63086_)
get(int p_63088_, int p_63089_, int p_63090_)
private T
getAndSetUnchecked(int p_63128_, int p_63129_, int p_63130_, T p_63131_)
private static int
getIndex(int p_63124_, int p_63125_, int p_63126_)
int
boolean
int
void
void
read(FriendlyByteBuf p_63119_)
void
release()
void
private void
private void
setBits(int p_63122_)
private void
setBits(int p_63122_, boolean forceBits)
void
write(CompoundTag p_63112_, String p_63113_, String p_63114_)
void
write(FriendlyByteBuf p_63136_)
-
Field Details
-
SIZE
private static final int SIZE- See Also:
- Constant Field Values
-
GLOBAL_PALETTE_BITS
public static final int GLOBAL_PALETTE_BITS- See Also:
- Constant Field Values
-
MIN_PALETTE_SIZE
public static final int MIN_PALETTE_SIZE- See Also:
- Constant Field Values
-
globalPalette
-
dummyPaletteResize
-
registry
-
reader
-
writer
-
defaultValue
-
storage
-
palette
-
bits
private int bits -
lock
-
traces
@Nullable private final DebugBuffer<com.mojang.datafixers.util.Pair<Thread,StackTraceElement[]>> traces
-
-
Constructor Details
-
PalettedContainer
-
-
Method Details
-
acquire
public void acquire() -
release
public void release() -
getIndex
private static int getIndex(int p_63124_, int p_63125_, int p_63126_) -
setBits
private void setBits(int p_63122_) -
setBits
private void setBits(int p_63122_, boolean forceBits) -
onResize
- Specified by:
onResize
in interfacePaletteResize<T>
-
getAndSet
-
getAndSetUnchecked
-
getAndSet
-
set
-
set
-
get
-
get
-
read
-
write
-
read
-
write
-
getSerializedSize
public int getSerializedSize() -
maybeHas
-
count
-