update __main__.py.
修复一些小bug
This commit is contained in:
parent
c109baadc1
commit
de373cf404
@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user