diff --git a/overviewer_core/world.py b/overviewer_core/world.py index 5dcecad..856e7f4 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -1262,8 +1262,11 @@ class RegionSet(object): def _get_blockdata_v113(self, section, unrecognized_block_types, longarray_unpacker): # Translate each entry in the palette to a 1.2-era (block, data) int pair. num_palette_entries = len(section['Palette']) - translated_blocks = numpy.zeros((num_palette_entries,), dtype=numpy.uint16) # block IDs - translated_data = numpy.zeros((num_palette_entries,), dtype=numpy.uint8) # block data + # Due to Minecraft bugginess, we extend this array to contain zeroes all the way to the + # maximum palette index Minecraft can request in Minecraft 1.16 + next_pwr_two = 1 << math.ceil(math.log2(num_palette_entries)) + translated_blocks = numpy.zeros((next_pwr_two,), dtype=numpy.uint16) # block IDs + translated_data = numpy.zeros((next_pwr_two,), dtype=numpy.uint8) # block data for i in range(num_palette_entries): key = section['Palette'][i] try: