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
Modifier and TypeClassDescription(package private) static final record
static interface
(package private) static final record
(package private) static final record
static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate PalettedContainer.Data<T>
private final PaletteResize<T>
private static final int
private final PalettedContainer.Strategy
private final ThreadingDetector
-
Constructor Summary
ModifierConstructorDescriptionPalettedContainer
(IdMap<T> p_188035_, PalettedContainer.Strategy p_188036_, PalettedContainer.Configuration<T> p_188037_, BitStorage p_188038_, List<T> p_188039_) private
PalettedContainer
(IdMap<T> p_199928_, PalettedContainer.Strategy p_199929_, PalettedContainer.Data<T> p_199930_) PalettedContainer
(IdMap<T> p_188041_, T p_188042_, PalettedContainer.Strategy p_188043_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
acquire()
static <T> com.mojang.serialization.Codec<PalettedContainer<T>>
codec
(IdMap<T> p_188055_, com.mojang.serialization.Codec<T> p_188056_, PalettedContainer.Strategy p_188057_, T p_188058_) copy()
void
count
(PalettedContainer.CountConsumer<T> p_63100_) private PalettedContainer.Data<T>
createOrReuseData
(PalettedContainer.Data<T> p_188052_, int p_188053_) protected T
get
(int p_63086_) get
(int p_63088_, int p_63089_, int p_63090_) void
private T
getAndSetUnchecked
(int p_63128_, int p_63129_, int p_63130_, T p_63131_) int
boolean
int
private static <T> com.mojang.serialization.DataResult<PalettedContainer<T>>
read
(IdMap<T> p_188068_, PalettedContainer.Strategy p_188069_, PalettedContainer.DiscData<T> p_188070_) void
read
(FriendlyByteBuf p_63119_) void
release()
void
private void
private static <T> void
swapPalette
(int[] p_198190_, IntUnaryOperator p_198191_) private PalettedContainer.DiscData<T>
write
(IdMap<T> p_188065_, PalettedContainer.Strategy p_188066_) void
write
(FriendlyByteBuf p_63136_)
-
Field Details
-
MIN_PALETTE_BITS
private static final int MIN_PALETTE_BITS- See Also:
-
dummyPaletteResize
-
registry
-
data
-
strategy
-
threadingDetector
-
-
Constructor Details
-
PalettedContainer
public PalettedContainer(IdMap<T> p_188035_, PalettedContainer.Strategy p_188036_, PalettedContainer.Configuration<T> p_188037_, BitStorage p_188038_, List<T> p_188039_) -
PalettedContainer
private PalettedContainer(IdMap<T> p_199928_, PalettedContainer.Strategy p_199929_, PalettedContainer.Data<T> p_199930_) -
PalettedContainer
-
-
Method Details
-
acquire
public void acquire() -
release
public void release() -
codec
public static <T> com.mojang.serialization.Codec<PalettedContainer<T>> codec(IdMap<T> p_188055_, com.mojang.serialization.Codec<T> p_188056_, PalettedContainer.Strategy p_188057_, T p_188058_) -
createOrReuseData
private PalettedContainer.Data<T> createOrReuseData(@Nullable PalettedContainer.Data<T> p_188052_, int p_188053_) -
onResize
- Specified by:
onResize
in interfacePaletteResize<T>
-
getAndSet
-
getAndSetUnchecked
-
getAndSet
-
set
-
set
-
get
-
get
-
getAll
-
read
-
write
-
read
private static <T> com.mojang.serialization.DataResult<PalettedContainer<T>> read(IdMap<T> p_188068_, PalettedContainer.Strategy p_188069_, PalettedContainer.DiscData<T> p_188070_) -
write
private PalettedContainer.DiscData<T> write(IdMap<T> p_188065_, PalettedContainer.Strategy p_188066_) -
swapPalette
-
getSerializedSize
public int getSerializedSize() -
maybeHas
-
copy
-
count
-