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 Palette
Palette.Factory -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final CrudeIncrementalIntIdentityHashBiMap<T> -
Constructor Summary
ConstructorsModifierConstructorDescriptionHashMapPalette(int bits) HashMapPalette(int bits, List<T> values) privateHashMapPalette(int bits, CrudeIncrementalIntIdentityHashBiMap<T> values) -
Method Summary
Modifier and TypeMethodDescriptioncopy()static <A> Palette<A> intgetSerializedSize(IdMap<T> globalMap) intgetSize()intidFor(T value, PaletteResize<T> resizeHandler) booleanvoidread(FriendlyByteBuf buffer, IdMap<T> globalMap) valueFor(int index) voidwrite(FriendlyByteBuf buffer, IdMap<T> globalMap)
-
Field Details
-
values
-
bits
private final int bits
-
-
Constructor Details
-
HashMapPalette
-
HashMapPalette
public HashMapPalette(int bits) -
HashMapPalette
-
-
Method Details
-
create
-
idFor
-
maybeHas
-
valueFor
-
read
-
write
-
getSerializedSize
- Specified by:
getSerializedSizein interfacePalette<T>
-
getEntries
-
getSize
-
copy
-