From 37ad13dba76e8c320194e1270388c9ed161b6888 Mon Sep 17 00:00:00 2001 From: Nicolas F Date: Wed, 11 Dec 2019 18:43:16 +0100 Subject: [PATCH] biome: for Y -1, return the first biome Apparently rotated worlds would try to access the biome for Y-level -1. I don't know why they do that (probably some dumb reason that may be a bug in of itself) but returning the first level should be harmless. Fixes #1683. --- overviewer_core/biome.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/overviewer_core/biome.py b/overviewer_core/biome.py index 8d79ef3..510b1b3 100644 --- a/overviewer_core/biome.py +++ b/overviewer_core/biome.py @@ -32,9 +32,7 @@ class BiomeDispensary: self.biomes[i] = biome_array[i * 256:(i + 1) * 256].reshape((16, 16)) def get_biome(self, y_level): - if y_level < 0: - return None - if self.biome_len == 256: + if self.biome_len == 256 or y_level < 0: return self.biomes[0] else: return self.biomes[y_level // 4]