Class PaletteTypeBase
java.lang.Object
com.viaversion.viaversion.api.type.Type<DataPalette>
com.viaversion.viaversion.api.type.types.chunk.PaletteTypeBase
- All Implemented Interfaces:
ByteBufReader<DataPalette>
,ByteBufWriter<DataPalette>
- Direct Known Subclasses:
PaletteType1_18
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract int
serializedSize
(@Nullable DataPalette palette) Calculates the size of the serialized data in bytes.Methods inherited from class com.viaversion.viaversion.api.type.Type
getBaseClass, getOutputClass, getTypeName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.viaversion.viaversion.api.type.ByteBufReader
read
Methods inherited from interface com.viaversion.viaversion.api.type.ByteBufWriter
write
-
Constructor Details
-
PaletteTypeBase
protected PaletteTypeBase()
-
-
Method Details
-
serializedSize
Calculates the size of the serialized data in bytes.- Parameters:
palette
- data palette- Returns:
- the size of the serialized data in bytes
-