Force GC after creating mod, might fix jvm issue
This commit is contained in:
parent
dc523e402f
commit
0cfdf60406
@ -56,7 +56,7 @@ public class PreLaunch implements PrePrePreLaunch {
|
|||||||
}
|
}
|
||||||
//Generate mods
|
//Generate mods
|
||||||
for (int i = 0; i < cfg.modsCount; i++) {
|
for (int i = 0; i < cfg.modsCount; i++) {
|
||||||
File f = new File(path, "f" + i + ".jar");
|
File f = new File(path, "f" + (i + 1) + ".jar");
|
||||||
injector.addMod(f);
|
injector.addMod(f);
|
||||||
//Do not load if cached
|
//Do not load if cached
|
||||||
if (f.exists()) {
|
if (f.exists()) {
|
||||||
@ -80,9 +80,9 @@ public class PreLaunch implements PrePrePreLaunch {
|
|||||||
sb = new StringBuilder();
|
sb = new StringBuilder();
|
||||||
sb.append("{");
|
sb.append("{");
|
||||||
sb.append("\"schemaVersion\": 1,");
|
sb.append("\"schemaVersion\": 1,");
|
||||||
sb.append("\"id\": \"modmod_").append(i).append("\",");
|
sb.append("\"id\": \"modmod_").append(i + 1).append("\",");
|
||||||
sb.append("\"version\": \"1.0\",");
|
sb.append("\"version\": \"1.0\",");
|
||||||
sb.append("\"name\": \"ModsMod ").append(i).append("\",");
|
sb.append("\"name\": \"ModsMod ").append(i + 1).append("\",");
|
||||||
//sb.append("\"icon\": \"assets/modsmod/icon_1.png\",");
|
//sb.append("\"icon\": \"assets/modsmod/icon_1.png\",");
|
||||||
sb.append("\"entrypoints\": {},");
|
sb.append("\"entrypoints\": {},");
|
||||||
sb.append("\"custom\": {");
|
sb.append("\"custom\": {");
|
||||||
@ -99,6 +99,7 @@ public class PreLaunch implements PrePrePreLaunch {
|
|||||||
System.err.println("Failed to generate mod!");
|
System.err.println("Failed to generate mod!");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
System.gc();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user