Package net.minecraft.world.chunk
Class PalettedContainer<T>
java.lang.Object
net.minecraft.world.chunk.PalettedContainer<T>
- All Implemented Interfaces:
PaletteResizeListener<T>
public class PalettedContainer<T> extends Object implements PaletteResizeListener<T>
- Mappings:
Namespace Name official ckd
intermediary net/minecraft/class_2841
named net/minecraft/world/chunk/PalettedContainer
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PalettedContainer.CountConsumer<T>
-
Field Summary
Fields Modifier and Type Field Description protected PackedIntegerArray
data
private T
defaultValue
private Function<CompoundTag,T>
elementDeserializer
private Function<T,CompoundTag>
elementSerializer
private Palette<T>
fallbackPalette
private IdList<T>
idList
private PaletteResizeListener<T>
noOpPaletteResizeHandler
private Palette<T>
palette
private int
paletteSize
private ReentrantLock
writeLock
-
Constructor Summary
Constructors Constructor Description PalettedContainer(Palette<T> fallbackPalette, IdList<T> idList, Function<CompoundTag,T> elementDeserializer, Function<T,CompoundTag> elementSerializer, T defaultElement)
-
Method Summary
Modifier and Type Method Description void
count(PalettedContainer.CountConsumer<T> consumer)
void
fromPacket(PacketByteBuf buf)
protected T
get(int index)
T
get(int x, int y, int z)
int
getPacketSize()
boolean
hasAny(Predicate<T> predicate)
void
lock()
int
onResize(int newSize, T objectAdded)
void
read(ListTag paletteTag, long[] data)
T
set(int x, int y, int z, T value)
protected void
set(int index, T t)
protected T
setAndGetOldValue(int index, T value)
private void
setPaletteSize(int size)
T
setSync(int x, int y, int z, T value)
private static int
toIndex(int x, int y, int z)
void
toPacket(PacketByteBuf buf)
void
unlock()
void
write(CompoundTag tag, String paletteKey, String dataKey)
-
Field Details
-
fallbackPalette
- Mappings:
Namespace Name Mixin selector official b
Lckd;b:Lckb;
intermediary field_12940
Lnet/minecraft/class_2841;field_12940:Lnet/minecraft/class_2837;
named fallbackPalette
Lnet/minecraft/world/chunk/PalettedContainer;fallbackPalette:Lnet/minecraft/world/chunk/Palette;
-
noOpPaletteResizeHandler
- Mappings:
Namespace Name Mixin selector official c
Lckd;c:Lckc;
intermediary field_12942
Lnet/minecraft/class_2841;field_12942:Lnet/minecraft/class_2835;
named noOpPaletteResizeHandler
Lnet/minecraft/world/chunk/PalettedContainer;noOpPaletteResizeHandler:Lnet/minecraft/world/chunk/PaletteResizeListener;
-
idList
- Mappings:
Namespace Name Mixin selector official d
Lckd;d:Lgh;
intermediary field_12938
Lnet/minecraft/class_2841;field_12938:Lnet/minecraft/class_2361;
named idList
Lnet/minecraft/world/chunk/PalettedContainer;idList:Lnet/minecraft/util/collection/IdList;
-
elementDeserializer
- Mappings:
Namespace Name Mixin selector official e
Lckd;e:Ljava/util/function/Function;
intermediary field_12943
Lnet/minecraft/class_2841;field_12943:Ljava/util/function/Function;
named elementDeserializer
Lnet/minecraft/world/chunk/PalettedContainer;elementDeserializer:Ljava/util/function/Function;
-
elementSerializer
- Mappings:
Namespace Name Mixin selector official f
Lckd;f:Ljava/util/function/Function;
intermediary field_12939
Lnet/minecraft/class_2841;field_12939:Ljava/util/function/Function;
named elementSerializer
Lnet/minecraft/world/chunk/PalettedContainer;elementSerializer:Ljava/util/function/Function;
-
defaultValue
- Mappings:
Namespace Name Mixin selector official g
Lckd;g:Ljava/lang/Object;
intermediary field_12935
Lnet/minecraft/class_2841;field_12935:Ljava/lang/Object;
named defaultValue
Lnet/minecraft/world/chunk/PalettedContainer;defaultValue:Ljava/lang/Object;
-
data
- Mappings:
Namespace Name Mixin selector official a
Lckd;a:Lafi;
intermediary field_12941
Lnet/minecraft/class_2841;field_12941:Lnet/minecraft/class_3508;
named data
Lnet/minecraft/world/chunk/PalettedContainer;data:Lnet/minecraft/util/collection/PackedIntegerArray;
-
palette
- Mappings:
Namespace Name Mixin selector official h
Lckd;h:Lckb;
intermediary field_12936
Lnet/minecraft/class_2841;field_12936:Lnet/minecraft/class_2837;
named palette
Lnet/minecraft/world/chunk/PalettedContainer;palette:Lnet/minecraft/world/chunk/Palette;
-
paletteSize
private int paletteSize- Mappings:
Namespace Name Mixin selector official i
Lckd;i:I
intermediary field_12934
Lnet/minecraft/class_2841;field_12934:I
named paletteSize
Lnet/minecraft/world/chunk/PalettedContainer;paletteSize:I
-
writeLock
- Mappings:
Namespace Name Mixin selector official j
Lckd;j:Ljava/util/concurrent/locks/ReentrantLock;
intermediary field_12937
Lnet/minecraft/class_2841;field_12937:Ljava/util/concurrent/locks/ReentrantLock;
named writeLock
Lnet/minecraft/world/chunk/PalettedContainer;writeLock:Ljava/util/concurrent/locks/ReentrantLock;
-
-
Constructor Details
-
PalettedContainer
public PalettedContainer(Palette<T> fallbackPalette, IdList<T> idList, Function<CompoundTag,T> elementDeserializer, Function<T,CompoundTag> elementSerializer, T defaultElement)- Mappings:
Namespace Name Mixin selector official <init>
Lckd;<init>(Lckb;Lgh;Ljava/util/function/Function;Ljava/util/function/Function;Ljava/lang/Object;)V
intermediary <init>
Lnet/minecraft/class_2841;<init>(Lnet/minecraft/class_2837;Lnet/minecraft/class_2361;Ljava/util/function/Function;Ljava/util/function/Function;Ljava/lang/Object;)V
named <init>
Lnet/minecraft/world/chunk/PalettedContainer;<init>(Lnet/minecraft/world/chunk/Palette;Lnet/minecraft/util/collection/IdList;Ljava/util/function/Function;Ljava/util/function/Function;Ljava/lang/Object;)V
-
-
Method Details
-
lock
public void lock()- Mappings:
Namespace Name Mixin selector official a
Lckd;a()V
intermediary method_12334
Lnet/minecraft/class_2841;method_12334()V
named lock
Lnet/minecraft/world/chunk/PalettedContainer;lock()V
-
unlock
public void unlock()- Mappings:
Namespace Name Mixin selector official b
Lckd;b()V
intermediary method_12335
Lnet/minecraft/class_2841;method_12335()V
named unlock
Lnet/minecraft/world/chunk/PalettedContainer;unlock()V
-
toIndex
private static int toIndex(int x, int y, int z)- Mappings:
Namespace Name Mixin selector official b
Lckd;b(III)I
intermediary method_12323
Lnet/minecraft/class_2841;method_12323(III)I
named toIndex
Lnet/minecraft/world/chunk/PalettedContainer;toIndex(III)I
-
setPaletteSize
private void setPaletteSize(int size)- Mappings:
Namespace Name Mixin selector official b
Lckd;b(I)V
intermediary method_12324
Lnet/minecraft/class_2841;method_12324(I)V
named setPaletteSize
Lnet/minecraft/world/chunk/PalettedContainer;setPaletteSize(I)V
-
onResize
- Specified by:
onResize
in interfacePaletteResizeListener<T>
- Mappings:
Namespace Name Mixin selector official onResize
Lckc;onResize(ILjava/lang/Object;)I
intermediary onResize
Lnet/minecraft/class_2835;onResize(ILjava/lang/Object;)I
named onResize
Lnet/minecraft/world/chunk/PaletteResizeListener;onResize(ILjava/lang/Object;)I
-
setSync
- Mappings:
Namespace Name Mixin selector official a
Lckd;a(IIILjava/lang/Object;)Ljava/lang/Object;
intermediary method_12328
Lnet/minecraft/class_2841;method_12328(IIILjava/lang/Object;)Ljava/lang/Object;
named setSync
Lnet/minecraft/world/chunk/PalettedContainer;setSync(IIILjava/lang/Object;)Ljava/lang/Object;
-
set
- Mappings:
Namespace Name Mixin selector official b
Lckd;b(IIILjava/lang/Object;)Ljava/lang/Object;
intermediary method_16678
Lnet/minecraft/class_2841;method_16678(IIILjava/lang/Object;)Ljava/lang/Object;
named set
Lnet/minecraft/world/chunk/PalettedContainer;set(IIILjava/lang/Object;)Ljava/lang/Object;
-
setAndGetOldValue
- Mappings:
Namespace Name Mixin selector official a
Lckd;a(ILjava/lang/Object;)Ljava/lang/Object;
intermediary method_12336
Lnet/minecraft/class_2841;method_12336(ILjava/lang/Object;)Ljava/lang/Object;
named setAndGetOldValue
Lnet/minecraft/world/chunk/PalettedContainer;setAndGetOldValue(ILjava/lang/Object;)Ljava/lang/Object;
-
set
- Mappings:
Namespace Name Mixin selector official b
Lckd;b(ILjava/lang/Object;)V
intermediary method_12322
Lnet/minecraft/class_2841;method_12322(ILjava/lang/Object;)V
named set
Lnet/minecraft/world/chunk/PalettedContainer;set(ILjava/lang/Object;)V
-
get
- Mappings:
Namespace Name Mixin selector official a
Lckd;a(III)Ljava/lang/Object;
intermediary method_12321
Lnet/minecraft/class_2841;method_12321(III)Ljava/lang/Object;
named get
Lnet/minecraft/world/chunk/PalettedContainer;get(III)Ljava/lang/Object;
-
get
- Mappings:
Namespace Name Mixin selector official a
Lckd;a(I)Ljava/lang/Object;
intermediary method_12331
Lnet/minecraft/class_2841;method_12331(I)Ljava/lang/Object;
named get
Lnet/minecraft/world/chunk/PalettedContainer;get(I)Ljava/lang/Object;
-
fromPacket
- Mappings:
Namespace Name Mixin selector official a
Lckd;a(Lnw;)V
intermediary method_12326
Lnet/minecraft/class_2841;method_12326(Lnet/minecraft/class_2540;)V
named fromPacket
Lnet/minecraft/world/chunk/PalettedContainer;fromPacket(Lnet/minecraft/network/PacketByteBuf;)V
-
toPacket
- Mappings:
Namespace Name Mixin selector official b
Lckd;b(Lnw;)V
intermediary method_12325
Lnet/minecraft/class_2841;method_12325(Lnet/minecraft/class_2540;)V
named toPacket
Lnet/minecraft/world/chunk/PalettedContainer;toPacket(Lnet/minecraft/network/PacketByteBuf;)V
-
read
- Mappings:
Namespace Name Mixin selector official a
Lckd;a(Lmw;[J)V
intermediary method_12329
Lnet/minecraft/class_2841;method_12329(Lnet/minecraft/class_2499;[J)V
named read
Lnet/minecraft/world/chunk/PalettedContainer;read(Lnet/minecraft/nbt/ListTag;[J)V
-
write
- Mappings:
Namespace Name Mixin selector official a
Lckd;a(Lmq;Ljava/lang/String;Ljava/lang/String;)V
intermediary method_12330
Lnet/minecraft/class_2841;method_12330(Lnet/minecraft/class_2487;Ljava/lang/String;Ljava/lang/String;)V
named write
Lnet/minecraft/world/chunk/PalettedContainer;write(Lnet/minecraft/nbt/CompoundTag;Ljava/lang/String;Ljava/lang/String;)V
-
getPacketSize
public int getPacketSize()- Mappings:
Namespace Name Mixin selector official c
Lckd;c()I
intermediary method_12327
Lnet/minecraft/class_2841;method_12327()I
named getPacketSize
Lnet/minecraft/world/chunk/PalettedContainer;getPacketSize()I
-
hasAny
- Mappings:
Namespace Name Mixin selector official a
Lckd;a(Ljava/util/function/Predicate;)Z
intermediary method_19526
Lnet/minecraft/class_2841;method_19526(Ljava/util/function/Predicate;)Z
named hasAny
Lnet/minecraft/world/chunk/PalettedContainer;hasAny(Ljava/util/function/Predicate;)Z
-
count
- Mappings:
Namespace Name Mixin selector official a
Lckd;a(Lckd$a;)V
intermediary method_21732
Lnet/minecraft/class_2841;method_21732(Lnet/minecraft/class_2841$class_4464;)V
named count
Lnet/minecraft/world/chunk/PalettedContainer;count(Lnet/minecraft/world/chunk/PalettedContainer$CountConsumer;)V
-