[Forge Installer 1.12+] fix the error

This commit is contained in:
ArtDev 2020-11-23 19:54:27 +03:00 committed by GitHub
parent 1495928bb0
commit 989efc3385
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@ public class NewForgeInstaller extends BaseInstaller {
versionFile.mkdir(); versionFile.mkdir();
target = versionFile.getAbsolutePath() + "/" + profile.version + ".json"; target = versionFile.getAbsolutePath() + "/" + profile.version + ".json";
ctx.appendlnToLog("Writing " + target + " from " + profile.json); ctx.appendlnToLog("Writing " + target + " from " + profile.json);
ZipEntry versionJson = mJarFile.getEntry(profile.json==null ? "version.json" : profile.json.substring(profile.json.indexOf("/")+1,profile.json.length()); ZipEntry versionJson = mJarFile.getEntry(profile.json==null ? "version.json" : profile.json.substring(profile.json.indexOf("/")+1,profile.json.length()));
Tools.write( Tools.write(
target, target,
Tools.convertStream(mJarFile.getInputStream(versionJson)) Tools.convertStream(mJarFile.getInputStream(versionJson))