From c15b9383c8541e29860b6f097c0401e631151e60 Mon Sep 17 00:00:00 2001 From: CounterPillow Date: Tue, 3 Jun 2014 18:08:27 +0200 Subject: [PATCH] Remove broken special case for ancient worlds And to whoever wrote that thing: "World10" is not 6 characters long, so the workaround was broken anyway. --- overviewer_core/world.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/overviewer_core/world.py b/overviewer_core/world.py index bbfc7cf..0597317 100644 --- a/overviewer_core/world.py +++ b/overviewer_core/world.py @@ -780,12 +780,7 @@ def get_worlds(): if not os.path.exists(world_dat): continue info = nbt.load(world_dat)[1] info['Data']['path'] = os.path.join(save_dir, dir).decode(loc) - if dir.startswith("World") and len(dir) == 6: - try: - world_n = int(dir[-1]) - ret[world_n] = info['Data'] - except ValueError: - pass + if 'LevelName' in info['Data'].keys(): ret[info['Data']['LevelName']] = info['Data']