From 8d748c9ee7eb22c20d006785edd7d4790c7745eb Mon Sep 17 00:00:00 2001 From: burningtnt Date: Thu, 1 Feb 2024 13:49:26 +0800 Subject: [PATCH 1/6] Support download OptiFine from it's own maven. --- .../resources/assets/lang/I18N.properties | 2 +- .../resources/assets/lang/I18N_zh.properties | 2 +- .../assets/lang/I18N_zh_CN.properties | 2 +- .../hmcl/download/MojangDownloadProvider.java | 6 +- .../optifine/OptiFine302VersionList.java | 94 +++++++++++++++++++ .../optifine/OptiFineBMCLVersionList.java | 62 +++++++----- .../download/optifine/OptiFineVersion.java | 90 ------------------ 7 files changed, 140 insertions(+), 118 deletions(-) create mode 100644 HMCLCore/src/main/java/org/jackhuang/hmcl/download/optifine/OptiFine302VersionList.java delete mode 100644 HMCLCore/src/main/java/org/jackhuang/hmcl/download/optifine/OptiFineVersion.java diff --git a/HMCL/src/main/resources/assets/lang/I18N.properties b/HMCL/src/main/resources/assets/lang/I18N.properties index 5f69def41..446fe8d98 100644 --- a/HMCL/src/main/resources/assets/lang/I18N.properties +++ b/HMCL/src/main/resources/assets/lang/I18N.properties @@ -325,7 +325,7 @@ download.failed.refresh=Unable to fetch version list. Please click here to retry download.game=Game download.provider.mcbbs=MCBBS (https://www.mcbbs.net/) download.provider.bmclapi=BMCLAPI (bangbang93, https://bmclapi2.bangbang93.com/) -download.provider.mojang=Mojang (OptiFine is provided by BMCLAPI) +download.provider.mojang=Mojang (OptiFine is provided by BMCLAPI and OF-302) download.provider.official=From Official Sources download.provider.balanced=From Fastest Available download.provider.mirror=From Mirror diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh.properties b/HMCL/src/main/resources/assets/lang/I18N_zh.properties index 18747cb7f..b5e618429 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh.properties @@ -332,7 +332,7 @@ download.failed.refresh=載入版本列表失敗,按一下此處重試。 download.game=新遊戲 download.provider.mcbbs=我的世界中文論壇 (MCBBS, https://www.mcbbs.net/) download.provider.bmclapi=BMCLAPI (bangbang93,https://bmclapi2.bangbang93.com/) -download.provider.mojang=官方伺服器 (OptiFine 自動安裝的下載來源是 BMCLAPI) +download.provider.mojang=官方 (OptiFine 自動安裝使用 BMCLAPI 下載源和 OF-302) download.provider.official=儘量使用官方源(最新,但可能加載慢) download.provider.balanced=選擇加載速度快的下載源(平衡,但可能不是最新) download.provider.mirror=儘量使用鏡像源(加載快,但可能不是最新) diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties index 7008c8293..7e5572ff0 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties @@ -333,7 +333,7 @@ download.failed.refresh=[加载版本列表失败,点击此处重试] download.game=新游戏 download.provider.mcbbs=我的世界中文论坛 (MCBBS, https://www.mcbbs.net) download.provider.bmclapi=BMCLAPI(bangbang93,https://bmclapi2.bangbang93.com) -download.provider.mojang=官方(OptiFine 自动安装使用 BMCLAPI 下载源) +download.provider.mojang=官方(OptiFine 自动安装使用 BMCLAPI 下载源和 OF-302) download.provider.official=尽量使用官方源(最新,但可能加载慢) download.provider.balanced=选择加载速度快的下载源(平衡,但可能不是最新) download.provider.mirror=尽量使用镜像源(加载快,但可能不是最新) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java index a0a677f25..bdba153f2 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java @@ -23,7 +23,7 @@ import org.jackhuang.hmcl.download.forge.ForgeBMCLVersionList; import org.jackhuang.hmcl.download.game.GameVersionList; import org.jackhuang.hmcl.download.liteloader.LiteLoaderVersionList; import org.jackhuang.hmcl.download.neoforge.NeoForgeOfficialVersionList; -import org.jackhuang.hmcl.download.optifine.OptiFineBMCLVersionList; +import org.jackhuang.hmcl.download.optifine.OptiFine302VersionList; import org.jackhuang.hmcl.download.quilt.QuiltAPIVersionList; import org.jackhuang.hmcl.download.quilt.QuiltVersionList; @@ -38,7 +38,7 @@ public class MojangDownloadProvider implements DownloadProvider { private final ForgeBMCLVersionList forge; private final NeoForgeOfficialVersionList neoforge; private final LiteLoaderVersionList liteLoader; - private final OptiFineBMCLVersionList optifine; + private final OptiFine302VersionList optifine; private final QuiltVersionList quilt; private final QuiltAPIVersionList quiltApi; @@ -52,7 +52,7 @@ public class MojangDownloadProvider implements DownloadProvider { this.forge = new ForgeBMCLVersionList(apiRoot); this.neoforge = new NeoForgeOfficialVersionList(this); this.liteLoader = new LiteLoaderVersionList(this); - this.optifine = new OptiFineBMCLVersionList(apiRoot); + this.optifine = new OptiFine302VersionList("https://zkitefly.github.io/optifine-download-list/index.json"); this.quilt = new QuiltVersionList(this); this.quiltApi = new QuiltAPIVersionList(this); } diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/optifine/OptiFine302VersionList.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/optifine/OptiFine302VersionList.java new file mode 100644 index 000000000..eed1e4921 --- /dev/null +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/optifine/OptiFine302VersionList.java @@ -0,0 +1,94 @@ +/* + * Hello Minecraft! Launcher + * Copyright (C) 2020 huangyuhui and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.jackhuang.hmcl.download.optifine; + +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import org.jackhuang.hmcl.download.VersionList; +import org.jackhuang.hmcl.util.io.HttpRequest; +import org.jackhuang.hmcl.util.versioning.VersionNumber; + +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.stream.Collectors; + +/** + * @author huangyuhui + */ +public final class OptiFine302VersionList extends VersionList { + private final String versionListURL; + + public OptiFine302VersionList(String versionListURL) { + this.versionListURL = versionListURL; + } + + @Override + public boolean hasType() { + return true; + } + + @Override + public CompletableFuture refreshAsync() { + return HttpRequest.GET(versionListURL).getJsonAsync(new TypeToken() { + }.getType()).thenAcceptAsync(root -> { + lock.writeLock().lock(); + + try { + versions.clear(); + for (OptiFineVersion element : root.versions) { + String gameVersion = VersionNumber.normalize(element.gameVersion); + versions.put(gameVersion, new OptiFineRemoteVersion( + gameVersion, element.version, + root.downloadBases.stream().map(u -> u + element.fileName).collect(Collectors.toList()), + element.fileName.startsWith("pre") + )); + } + } finally { + lock.writeLock().unlock(); + } + }); + } + + private static final class VersionList { + @SerializedName("file") + private final List versions; + + @SerializedName("download") + private final List downloadBases; + + public VersionList(List versions, List downloadBases) { + this.versions = versions; + this.downloadBases = downloadBases; + } + } + + private static final class OptiFineVersion { + @SerializedName("name") + private final String version; + @SerializedName("filename") + private final String fileName; + @SerializedName("mcversion") + private final String gameVersion; + + public OptiFineVersion(String version, String fileName, String gameVersion) { + this.version = version; + this.fileName = fileName; + this.gameVersion = gameVersion; + } + } +} diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/optifine/OptiFineBMCLVersionList.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/optifine/OptiFineBMCLVersionList.java index 47aeb340e..28baa47c0 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/optifine/OptiFineBMCLVersionList.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/optifine/OptiFineBMCLVersionList.java @@ -17,6 +17,7 @@ */ package org.jackhuang.hmcl.download.optifine; +import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; import org.jackhuang.hmcl.download.VersionList; import org.jackhuang.hmcl.util.StringUtils; @@ -30,7 +31,6 @@ import java.util.Set; import java.util.concurrent.CompletableFuture; /** - * * @author huangyuhui */ public final class OptiFineBMCLVersionList extends VersionList { @@ -51,31 +51,49 @@ public final class OptiFineBMCLVersionList extends VersionList refreshAsync() { return HttpRequest.GET(apiRoot + "/optifine/versionlist").>getJsonAsync(new TypeToken>() { - }.getType()) - .thenAcceptAsync(root -> { - lock.writeLock().lock(); + }.getType()).thenAcceptAsync(root -> { + lock.writeLock().lock(); - try { - versions.clear(); - Set duplicates = new HashSet<>(); - for (OptiFineVersion element : root) { - String version = element.getType() + "_" + element.getPatch(); - String mirror = "https://bmclapi2.bangbang93.com/optifine/" + element.getGameVersion() + "/" + element.getType() + "/" + element.getPatch(); - if (!duplicates.add(mirror)) - continue; + try { + versions.clear(); + Set duplicates = new HashSet<>(); + for (OptiFineVersion element : root) { + String version = element.type + "_" + element.patch; + String mirror = apiRoot + "/optifine/" + element.gameVersion + "/" + element.type + "/" + element.patch; + if (!duplicates.add(mirror)) + continue; - boolean isPre = element.getPatch() != null && (element.getPatch().startsWith("pre") || element.getPatch().startsWith("alpha")); + boolean isPre = element.patch != null && (element.patch.startsWith("pre") || element.patch.startsWith("alpha")); - if (StringUtils.isBlank(element.getGameVersion())) - continue; + if (StringUtils.isBlank(element.gameVersion)) + continue; - String gameVersion = VersionNumber.normalize(element.getGameVersion()); - versions.put(gameVersion, new OptiFineRemoteVersion(gameVersion, version, Collections.singletonList(mirror), isPre)); - } - } finally { - lock.writeLock().unlock(); - } - }); + String gameVersion = VersionNumber.normalize(element.gameVersion); + versions.put(gameVersion, new OptiFineRemoteVersion(gameVersion, version, Collections.singletonList(mirror), isPre)); + } + } finally { + lock.writeLock().unlock(); + } + }); } + /** + * @author huangyuhui + */ + private static final class OptiFineVersion { + @SerializedName("type") + private final String type; + + @SerializedName("patch") + private final String patch; + + @SerializedName("mcversion") + private final String gameVersion; + + public OptiFineVersion(String type, String patch, String gameVersion) { + this.type = type; + this.patch = patch; + this.gameVersion = gameVersion; + } + } } diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/optifine/OptiFineVersion.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/optifine/OptiFineVersion.java deleted file mode 100644 index a18fe1b4f..000000000 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/optifine/OptiFineVersion.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Hello Minecraft! Launcher - * Copyright (C) 2020 huangyuhui and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.jackhuang.hmcl.download.optifine; - -import com.google.gson.annotations.SerializedName; - -/** - * - * @author huangyuhui - */ -public final class OptiFineVersion { - - @SerializedName("dl") - private final String downloadLink; - - @SerializedName("ver") - private final String version; - - @SerializedName("date") - private final String date; - - @SerializedName("type") - private final String type; - - @SerializedName("patch") - private final String patch; - - @SerializedName("mirror") - private final String mirror; - - @SerializedName("mcversion") - private final String gameVersion; - - public OptiFineVersion() { - this(null, null, null, null, null, null, null); - } - - public OptiFineVersion(String downloadLink, String version, String date, String type, String patch, String mirror, String gameVersion) { - this.downloadLink = downloadLink; - this.version = version; - this.date = date; - this.type = type; - this.patch = patch; - this.mirror = mirror; - this.gameVersion = gameVersion; - } - - public String getDownloadLink() { - return downloadLink; - } - - public String getVersion() { - return version; - } - - public String getDate() { - return date; - } - - public String getType() { - return type; - } - - public String getPatch() { - return patch; - } - - public String getMirror() { - return mirror; - } - - public String getGameVersion() { - return gameVersion; - } -} From 4110fe4ee693be5b79bd6d10bc1d8a06ff4f2b32 Mon Sep 17 00:00:00 2001 From: burningtnt Date: Thu, 1 Feb 2024 14:01:42 +0800 Subject: [PATCH 2/6] Fix I18N. --- HMCL/src/main/resources/assets/lang/I18N.properties | 2 +- HMCL/src/main/resources/assets/lang/I18N_zh.properties | 2 +- HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HMCL/src/main/resources/assets/lang/I18N.properties b/HMCL/src/main/resources/assets/lang/I18N.properties index 446fe8d98..5f69def41 100644 --- a/HMCL/src/main/resources/assets/lang/I18N.properties +++ b/HMCL/src/main/resources/assets/lang/I18N.properties @@ -325,7 +325,7 @@ download.failed.refresh=Unable to fetch version list. Please click here to retry download.game=Game download.provider.mcbbs=MCBBS (https://www.mcbbs.net/) download.provider.bmclapi=BMCLAPI (bangbang93, https://bmclapi2.bangbang93.com/) -download.provider.mojang=Mojang (OptiFine is provided by BMCLAPI and OF-302) +download.provider.mojang=Mojang (OptiFine is provided by BMCLAPI) download.provider.official=From Official Sources download.provider.balanced=From Fastest Available download.provider.mirror=From Mirror diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh.properties b/HMCL/src/main/resources/assets/lang/I18N_zh.properties index b5e618429..3b428951e 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh.properties @@ -332,7 +332,7 @@ download.failed.refresh=載入版本列表失敗,按一下此處重試。 download.game=新遊戲 download.provider.mcbbs=我的世界中文論壇 (MCBBS, https://www.mcbbs.net/) download.provider.bmclapi=BMCLAPI (bangbang93,https://bmclapi2.bangbang93.com/) -download.provider.mojang=官方 (OptiFine 自動安裝使用 BMCLAPI 下載源和 OF-302) +download.provider.mojang=官方 (OptiFine 自動安裝使用 BMCLAPI 下載源) download.provider.official=儘量使用官方源(最新,但可能加載慢) download.provider.balanced=選擇加載速度快的下載源(平衡,但可能不是最新) download.provider.mirror=儘量使用鏡像源(加載快,但可能不是最新) diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties index 7e5572ff0..7008c8293 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties @@ -333,7 +333,7 @@ download.failed.refresh=[加载版本列表失败,点击此处重试] download.game=新游戏 download.provider.mcbbs=我的世界中文论坛 (MCBBS, https://www.mcbbs.net) download.provider.bmclapi=BMCLAPI(bangbang93,https://bmclapi2.bangbang93.com) -download.provider.mojang=官方(OptiFine 自动安装使用 BMCLAPI 下载源和 OF-302) +download.provider.mojang=官方(OptiFine 自动安装使用 BMCLAPI 下载源) download.provider.official=尽量使用官方源(最新,但可能加载慢) download.provider.balanced=选择加载速度快的下载源(平衡,但可能不是最新) download.provider.mirror=尽量使用镜像源(加载快,但可能不是最新) From 9d619ceac2d3f46dd2c5f735527c0abdc7fc0147 Mon Sep 17 00:00:00 2001 From: burningtnt Date: Thu, 1 Feb 2024 14:53:41 +0800 Subject: [PATCH 3/6] Fix I18N. --- HMCL/src/main/resources/assets/lang/I18N.properties | 2 +- HMCL/src/main/resources/assets/lang/I18N_es.properties | 2 +- HMCL/src/main/resources/assets/lang/I18N_ja.properties | 2 +- HMCL/src/main/resources/assets/lang/I18N_ru.properties | 2 +- HMCL/src/main/resources/assets/lang/I18N_zh.properties | 2 +- HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/HMCL/src/main/resources/assets/lang/I18N.properties b/HMCL/src/main/resources/assets/lang/I18N.properties index 5f69def41..e6c844bdf 100644 --- a/HMCL/src/main/resources/assets/lang/I18N.properties +++ b/HMCL/src/main/resources/assets/lang/I18N.properties @@ -325,7 +325,7 @@ download.failed.refresh=Unable to fetch version list. Please click here to retry download.game=Game download.provider.mcbbs=MCBBS (https://www.mcbbs.net/) download.provider.bmclapi=BMCLAPI (bangbang93, https://bmclapi2.bangbang93.com/) -download.provider.mojang=Mojang (OptiFine is provided by BMCLAPI) +download.provider.mojang=Mojang (OptiFine is provided by OF-302) download.provider.official=From Official Sources download.provider.balanced=From Fastest Available download.provider.mirror=From Mirror diff --git a/HMCL/src/main/resources/assets/lang/I18N_es.properties b/HMCL/src/main/resources/assets/lang/I18N_es.properties index a4e1eb3f4..a28c7d26c 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_es.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_es.properties @@ -306,7 +306,7 @@ download.failed.refresh=No se ha podido obtener la lista de versiones. Por favor download.game=Juego download.provider.mcbbs=MCBBS (https://www.mcbbs.net/) download.provider.bmclapi=BMCLAPI (bangbang93, https://bmclapi2.bangbang93.com/) -download.provider.mojang=Mojang (OptiFine es proporcionado por BMCLAPI) +download.provider.mojang=Mojang (OptiFine es proporcionado por OF-302) download.provider.official=De fuentes oficiales download.provider.balanced=De la fuente más rápida disponible download.provider.mirror=Desde espejo diff --git a/HMCL/src/main/resources/assets/lang/I18N_ja.properties b/HMCL/src/main/resources/assets/lang/I18N_ja.properties index 753573d88..1979427df 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_ja.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_ja.properties @@ -285,7 +285,7 @@ download.failed.refresh=バージョンリストをダウンロードできま download.game=ゲームのダウンロード download.provider.mcbbs=MCBBS(https://www.mcbbs.net/) download.provider.bmclapi=BMCLAPI(ミラーソース) -download.provider.mojang=Mojang(OptiFineはBMCLAPIにより提供されます) 推奨 +download.provider.mojang=Mojang(OptiFineはOF-302により提供されます) 推奨 download.provider.official=公式ソースからロード download.provider.balanced=mcbbsのソースからロード download.provider.mirror=ミラーソースからロード diff --git a/HMCL/src/main/resources/assets/lang/I18N_ru.properties b/HMCL/src/main/resources/assets/lang/I18N_ru.properties index 1472c74b7..11707cb71 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_ru.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_ru.properties @@ -306,7 +306,7 @@ download.failed.refresh=Не удаётся получить список вер download.game=Игра download.provider.mcbbs=MCBBS (https://www.mcbbs.net/) download.provider.bmclapi=BMCLAPI (bangbang93, https://bmclapi2.bangbang93.com/) -download.provider.mojang=Mojang (OptiFine is provided by BMCLAPI) +download.provider.mojang=Mojang (OptiFine is provided by OF-302) download.provider.official=Из официальных источников download.provider.balanced=Из самых быстрых доступных download.provider.mirror=Из зеркала diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh.properties b/HMCL/src/main/resources/assets/lang/I18N_zh.properties index 3b428951e..600814701 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh.properties @@ -332,7 +332,7 @@ download.failed.refresh=載入版本列表失敗,按一下此處重試。 download.game=新遊戲 download.provider.mcbbs=我的世界中文論壇 (MCBBS, https://www.mcbbs.net/) download.provider.bmclapi=BMCLAPI (bangbang93,https://bmclapi2.bangbang93.com/) -download.provider.mojang=官方 (OptiFine 自動安裝使用 BMCLAPI 下載源) +download.provider.mojang=官方 (OptiFine 自動安裝使用 OF-302 下載源) download.provider.official=儘量使用官方源(最新,但可能加載慢) download.provider.balanced=選擇加載速度快的下載源(平衡,但可能不是最新) download.provider.mirror=儘量使用鏡像源(加載快,但可能不是最新) diff --git a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties index 7008c8293..200348802 100644 --- a/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties +++ b/HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties @@ -333,7 +333,7 @@ download.failed.refresh=[加载版本列表失败,点击此处重试] download.game=新游戏 download.provider.mcbbs=我的世界中文论坛 (MCBBS, https://www.mcbbs.net) download.provider.bmclapi=BMCLAPI(bangbang93,https://bmclapi2.bangbang93.com) -download.provider.mojang=官方(OptiFine 自动安装使用 BMCLAPI 下载源) +download.provider.mojang=官方(OptiFine 自动安装使用 OF-302 下载源) download.provider.official=尽量使用官方源(最新,但可能加载慢) download.provider.balanced=选择加载速度快的下载源(平衡,但可能不是最新) download.provider.mirror=尽量使用镜像源(加载快,但可能不是最新) From b41aad11d99286151c7dfead9c3eb80f04bf15de Mon Sep 17 00:00:00 2001 From: zkitefly <2573874409@qq.com> Date: Sat, 3 Feb 2024 13:52:53 +0800 Subject: [PATCH 4/6] updata link --- .../org/jackhuang/hmcl/download/MojangDownloadProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java index bdba153f2..3fc1bd4ed 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java @@ -52,7 +52,7 @@ public class MojangDownloadProvider implements DownloadProvider { this.forge = new ForgeBMCLVersionList(apiRoot); this.neoforge = new NeoForgeOfficialVersionList(this); this.liteLoader = new LiteLoaderVersionList(this); - this.optifine = new OptiFine302VersionList("https://zkitefly.github.io/optifine-download-list/index.json"); + this.optifine = new OptiFine302VersionList("https://optifine-download-list.netlify.app/index.json"); this.quilt = new QuiltVersionList(this); this.quiltApi = new QuiltAPIVersionList(this); } From 2f0dc963fb78dc99d2e9aa7953104951659cc7f0 Mon Sep 17 00:00:00 2001 From: zkitefly <2573874409@qq.com> Date: Mon, 5 Feb 2024 01:03:16 +0800 Subject: [PATCH 5/6] updata OptiFine302VersionList link --- .../org/jackhuang/hmcl/download/MojangDownloadProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java index 3fc1bd4ed..bdba153f2 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java @@ -52,7 +52,7 @@ public class MojangDownloadProvider implements DownloadProvider { this.forge = new ForgeBMCLVersionList(apiRoot); this.neoforge = new NeoForgeOfficialVersionList(this); this.liteLoader = new LiteLoaderVersionList(this); - this.optifine = new OptiFine302VersionList("https://optifine-download-list.netlify.app/index.json"); + this.optifine = new OptiFine302VersionList("https://zkitefly.github.io/optifine-download-list/index.json"); this.quilt = new QuiltVersionList(this); this.quiltApi = new QuiltAPIVersionList(this); } From 4a5230c93f78ef0ab4261754692459733411945c Mon Sep 17 00:00:00 2001 From: Burning_TNT <88144530+burningtnt@users.noreply.github.com> Date: Sun, 25 Aug 2024 10:28:46 +0800 Subject: [PATCH 6/6] Change URL Co-authored-by: Zkitefly <2573874409@qq.com> --- .../org/jackhuang/hmcl/download/MojangDownloadProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java index bdba153f2..bc88bce19 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java @@ -52,7 +52,7 @@ public class MojangDownloadProvider implements DownloadProvider { this.forge = new ForgeBMCLVersionList(apiRoot); this.neoforge = new NeoForgeOfficialVersionList(this); this.liteLoader = new LiteLoaderVersionList(this); - this.optifine = new OptiFine302VersionList("https://zkitefly.github.io/optifine-download-list/index.json"); + this.optifine = new OptiFine302VersionList("https://hmcl-dev.github.io/metadata/optifine/"); this.quilt = new QuiltVersionList(this); this.quiltApi = new QuiltAPIVersionList(this); }