From de373cf40481e2bab7e92ea80cc67e95d64b46b3 Mon Sep 17 00:00:00 2001 From: Bigsk <1332540+bigskcode@user.noreply.gitee.com> Date: Tue, 18 Aug 2020 22:17:23 +0800 Subject: [PATCH] =?UTF-8?q?update=20=5F=5Fmain=5F=5F.py.=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=B8=80=E4=BA=9B=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __main__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/__main__.py b/__main__.py index d09c890..d3c3b32 100644 --- a/__main__.py +++ b/__main__.py @@ -413,7 +413,7 @@ elif(parser.type=="get_game_version_list"): with open('temp/temp-2.gmclc', 'a') as file_object: if(number==count): if(count==1): - file_object.write(line.replace(line[::-1].split('\\', 1)[-1][::-1],'').replace('\\','').replace('.json','').replace('\n','')) + file_object.write('"' + line.replace(line[::-1].split('\\', 1)[-1][::-1],'').replace('\\','').replace('.json','').replace('\n','') + '"') else: file_object.write(line.replace(line[::-1].split('\\', 1)[-1][::-1],'').replace('\\','').replace('.json','').replace('\n','') + '"]') elif(number==1): @@ -535,7 +535,7 @@ elif(parser.type=="launcher_game"): return_info=os.popen('python __main__.py --type get_game_version_list --game_dir "' + dir_i) return_i=return_info.read() if(return_i.count('"' + parser.version + '"')!=0): - game_config_open=open(dir_i + '\\versions\\' + parser.version + '\\' + parser.version + '.json') + game_config_open=open(dir_i + '\\versions\\' + parser.version + '\\' + parser.version + '.json',encoding='UTF-8') game_config_json=game_config_open.read() game_config_open.close() game_config=json.loads(game_config_json) @@ -607,11 +607,11 @@ elif(parser.type=="launcher_game"): else: memory=parser.memory asset_index=game_config['assetIndex']['id'] - # + asset_index="1.16" command='\"' + java.replace('\n','') + '\" -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M -XX:-UseAdaptiveSizePolicy -XX:-OmitStackTraceInFastThrow -Xmn128m -Xmx' + memory + ' -Dfml.ignoreInvalidMinecraftCertificates=true -Dfml.ignorePatchDiscrepancies=true -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Djava.library.path=' + dir_i + '\\versions\\' + parser.version + '\\natives -Dminecraft.launcher.brand=' + config['default_launcher_name'] + ' -Dminecraft.launcher.version=' + config['version'] + ' -cp ' + cp + ' net.minecraft.client.main.Main --username ' + parser.id + ' --version "' + config['default_launcher_name'] + ' ' + config['version'] + '" --gameDir ' + dir_i + ' --assetsDir ' + dir_i + '\\assets --assetIndex ' + asset_index + ' --uuid ' + uuid + ' --accessToken ' + uuid + ' --userProperties {} --userType mojang' subprocess.Popen(command, shell=True) else: - return_data('The ersion you input is not exist!Please check if the parameter you input is correct!') + return_data('The version you input is not exist!Please check if the parameter you input is correct!') log('error','The vversion you input is not exist!Please check if the parameter you input is correct!') deadly_error()