[Forge installer] Add 1.12.2+ support

This commit is contained in:
khanhduytran0 2020-11-23 16:57:23 +07:00
parent 7a5c6f592d
commit 8c86158de2
6 changed files with 84 additions and 10 deletions

View file

@ -115,9 +115,12 @@ public class JavaGUILauncherActivity extends LoggableActivity {
installer.setInput(modFile);
if (InstallerDetector.isForgeLegacy(installer)) {
appendlnToLog("Detected Forge installer!");
new ForgeInstaller(installer).install(this);
} else {
appendlnToLog("Detected Forge Installer 1.12.1 or below!");
new LegacyForgeInstaller(installer).install(this);
} else if (InstallerDetector.isForgeNew(installer)) {
appendlnToLog("Detected Forge Installer 1.12.2 or above!");
new NewForgeInstaller(installer).install(this);
} else {
appendlnToLog("No mod detected. Starting JVM");
isLogAllow = false;
mSkipDetectMod = true;