mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-14 22:25:36 +01:00
Biome palettes entries can have 1 bit
This commit is contained in:
parent
5a90c8374c
commit
111cd2fd46
@ -89,7 +89,8 @@ public final class PaletteType1_18 extends PartialType<DataPalette, PaletteType>
|
|||||||
public void write(final ByteBuf buffer, final PaletteType type, final DataPalette palette) throws Exception {
|
public void write(final ByteBuf buffer, final PaletteType type, final DataPalette palette) throws Exception {
|
||||||
int bitsPerValue;
|
int bitsPerValue;
|
||||||
if (palette.size() > 1) {
|
if (palette.size() > 1) {
|
||||||
bitsPerValue = type == PaletteType.BLOCKS ? 4 : 2; //TODO implement linear palette
|
// 1, 2, and 3 bit linear palettes can't be read by the client
|
||||||
|
bitsPerValue = type == PaletteType.BLOCKS ? 4 : 1;
|
||||||
while (palette.size() > 1 << bitsPerValue) {
|
while (palette.size() > 1 << bitsPerValue) {
|
||||||
bitsPerValue += 1;
|
bitsPerValue += 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user