feat(install): Optifine 1.17 compatible with Forge now.

This commit is contained in:
huanghongxun
2021-10-03 22:04:55 +08:00
parent dfb2d3f2bf
commit e934d6c983
9 changed files with 81 additions and 22 deletions

View File

@@ -19,10 +19,8 @@ package org.jackhuang.hmcl.ui.download;
import javafx.scene.Node;
import org.jackhuang.hmcl.download.*;
import org.jackhuang.hmcl.download.fabric.FabricInstallTask;
import org.jackhuang.hmcl.download.game.GameAssetIndexDownloadTask;
import org.jackhuang.hmcl.download.game.LibraryDownloadException;
import org.jackhuang.hmcl.download.optifine.OptiFineInstallTask;
import org.jackhuang.hmcl.game.Version;
import org.jackhuang.hmcl.setting.DownloadProviders;
import org.jackhuang.hmcl.setting.Profile;
@@ -157,9 +155,15 @@ public final class UpdateInstallerWizardProvider implements WizardProvider {
} else {
Controllers.dialog(i18n("install.failed.downloading.detail", url) + "\n" + StringUtils.getStackTrace(exception.getCause()), i18n("install.failed.downloading"), MessageDialogPane.MessageType.ERROR, next);
}
} else if (exception instanceof OptiFineInstallTask.UnsupportedOptiFineInstallationException ||
exception instanceof FabricInstallTask.UnsupportedFabricInstallationException) {
Controllers.dialog(i18n("install.failed.optifine_conflict"), i18n("install.failed"), MessageDialogPane.MessageType.ERROR, next);
} else if (exception instanceof UnsupportedInstallationException) {
switch (((UnsupportedInstallationException) exception).getReason()) {
case UnsupportedInstallationException.FORGE_1_17_OPTIFINE_H1_PRE2:
Controllers.dialog(i18n("install.failed.optifine_forge_1.17"), i18n("install.failed"), MessageDialogPane.MessageType.ERROR, next);
break;
default:
Controllers.dialog(i18n("install.failed.optifine_conflict"), i18n("install.failed"), MessageDialogPane.MessageType.ERROR, next);
break;
}
} else if (exception instanceof DefaultDependencyManager.UnsupportedLibraryInstallerException) {
Controllers.dialog(i18n("install.failed.install_online"), i18n("install.failed"), MessageDialogPane.MessageType.ERROR, next);
} else if (exception instanceof ArtifactMalformedException || exception instanceof ZipException) {

View File

@@ -384,6 +384,7 @@ install.failed.downloading.timeout=Timed out while downloading the file: %s
install.failed.install_online=Unable to recognize the provided installer file. If you are installing a mod, go to "Mods" page.
install.failed.malformed=The files just downloaded a moment ago is malformed. You may switch to other download provider to resolve this problem.
install.failed.optifine_conflict=Fabric, OptiFine and Forge are installed simultaneously on Minecraft 1.13
install.failed.optifine_forge_1.17=For Minecraft 1.17.1, Only OptiFine H1 Pre2 and above versions are compatible with Forge, you can install them in snapshot versions.
install.failed.version_mismatch=The library requires the game version %s, but the actual version is %s.
install.installer.change_version=%s, this version is not compatible with current game version. Click here to choose another one.
install.installer.choose=Choose a %s version

View File

@@ -384,6 +384,7 @@ install.failed.downloading.timeout=下載逾時: %s
install.failed.install_online=無法識別要安裝的軟體。如果你要安裝 Mod你需要在模組管理頁面安裝模組。
install.failed.malformed=剛才下載的檔案格式損壞。您可以切換到其他下載來源以解決此問題。
install.failed.optifine_conflict=暫不支援 OptiFine 與 Forge 同時安裝在 Minecraft 1.13 上
install.failed.optifine_forge_1.17=Minecraft 1.17.1 下,僅 OptiFine H1 Pre2 及以上版本能相容 Forge。你可以從 OptiFine 測試版中選擇最新版本。
install.failed.version_mismatch=該軟體需要的遊戲版本為 %s但實際的遊戲版本為 %s。
install.installer.change_version=%s該版本與當前遊戲不相容您需要點擊此處更換版本或刪除
install.installer.choose=選擇 %s 版本

View File

@@ -384,6 +384,7 @@ install.failed.downloading.timeout=下载超时:%s
install.failed.install_online=无法识别要安装的软件。如果你要安装 Mod你需要在模组管理页面安装模组。
install.failed.malformed=下载的文件格式损坏。您可以切换到其他下载源来解决此问题。
install.failed.optifine_conflict=暂不支持 OptiFine, Fabric 与 Forge 同时安装在 Minecraft 1.13 及以上版本
install.failed.optifine_forge_1.17=Minecraft 1.17.1 下,仅 OptiFine H1 Pre2 及以上版本能兼容 Forge。你可以从 OptiFine 测试版中选择最新版本。
install.failed.version_mismatch=该软件需要的游戏版本为 %s但实际的游戏版本为 %s。
install.installer.change_version=%s该版本与当前游戏不兼容您需要点击此处更换版本或删除
install.installer.choose=选择 %s 版本