mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-05 10:29:45 +01:00
Fix bits per biome if there is only one biome in the palette
This commit is contained in:
parent
de5d8a4689
commit
9bc77c7257
@ -210,7 +210,7 @@ public Section(CompoundTag sectionData) {
|
||||
if (skyLight.length < 2048 && skyLight.length > 0) skyLight = Arrays.copyOf(skyLight, 2048);
|
||||
|
||||
this.bitsPerBlock = this.blocks.length >> 6; // available longs * 64 (bits per long) / 4096 (blocks per section) (floored result)
|
||||
this.bitsPerBiome = Integer.SIZE - Integer.numberOfLeadingZeros(this.biomePalette.length - 1);
|
||||
this.bitsPerBiome = Math.max(1, Integer.SIZE - Integer.numberOfLeadingZeros(this.biomePalette.length - 1));
|
||||
}
|
||||
|
||||
private BlockState readBlockStatePaletteEntry(CompoundTag paletteEntry) {
|
||||
|
Loading…
Reference in New Issue
Block a user