Package net.minecraft.world.level.chunk
Class HashMapPalette<T>
java.lang.Object
net.minecraft.world.level.chunk.HashMapPalette<T>
- All Implemented Interfaces:
Palette<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.level.chunk.Palette
Palette.Factory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final PaletteResize
<T> private final CrudeIncrementalIntIdentityHashBiMap
<T> -
Constructor Summary
ConstructorsModifierConstructorDescriptionHashMapPalette
(IdMap<T> pRegistry, int pBits, PaletteResize<T> pResizeHandler) HashMapPalette
(IdMap<T> pRegistry, int pBits, PaletteResize<T> pResizeHandler, List<T> pValues) private
HashMapPalette
(IdMap<T> pRegistry, int pBits, PaletteResize<T> pResizeHandler, CrudeIncrementalIntIdentityHashBiMap<T> pValues) -
Method Summary
Modifier and TypeMethodDescriptioncopy()
static <A> Palette
<A> create
(int pBits, IdMap<A> pRegistry, PaletteResize<A> pResizeHandler, List<A> pValues) int
int
getSize()
int
boolean
void
read
(FriendlyByteBuf pBuffer) valueFor
(int pId) void
write
(FriendlyByteBuf pBuffer)
-
Field Details
-
registry
-
values
-
resizeHandler
-
bits
private final int bits
-
-
Constructor Details
-
HashMapPalette
-
HashMapPalette
-
HashMapPalette
private HashMapPalette(IdMap<T> pRegistry, int pBits, PaletteResize<T> pResizeHandler, CrudeIncrementalIntIdentityHashBiMap<T> pValues)
-
-
Method Details
-
create
public static <A> Palette<A> create(int pBits, IdMap<A> pRegistry, PaletteResize<A> pResizeHandler, List<A> pValues) -
idFor
-
maybeHas
-
valueFor
-
read
-
write
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSize
in interfacePalette<T>
-
getEntries
-
getSize
public int getSize() -
copy
-