File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 22import amulet_nbt as n
33from tqdm import tqdm
44
5- OLD_SPAWNER_FORMAT = True # If this is false, uses 1.18+ nbt paths for spawners
5+ OLD_SPAWNER_FORMAT = False
66
77REG = re .compile (r'"text" *: *"((?:[^"\\]|\\\\"|\\.)*)"' )
88REG2 = re .compile (r'\\"text\\" *: *\\"((?:[^"\\]|\\\\.)*)\\"' )
@@ -324,7 +324,7 @@ def gen_lang(path):
324324def main ():
325325 print ("\n World Translation Extractor, by Suso. Using amulet core.\n " )
326326
327- if len (sys .argv ) != 2 :
327+ if len (sys .argv ) < 2 :
328328 print ("Usage: python {} <world>" .format (sys .argv [0 ]))
329329 exit (0 )
330330
@@ -336,6 +336,10 @@ def main():
336336 print ("\n Scanning chunks..." )
337337 try :
338338 level = amulet .load_level (sys .argv [1 ])
339+ if level .level_wrapper .version < 2826 :
340+ global OLD_SPAWNER_FORMAT
341+ OLD_SPAWNER_FORMAT = True
342+ print ("Using old spawner format." )
339343 scan_world (level )
340344 except Exception as e :
341345 print ("Error loading world:" , e )
You can’t perform that action at this time.
0 commit comments