From deb21c12eaf981c285cb7fb7147b714d3d2e3dba Mon Sep 17 00:00:00 2001 From: Zkitefly <2573874409@qq.com> Date: Tue, 20 Aug 2024 01:49:49 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20unlisted-versions-of-m?= =?UTF-8?q?inecraft?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hmcl/ui/download/VersionsPage.java | 2 ++ .../download/AdaptedDownloadProvider.java | 5 ++++ .../hmcl/download/AutoDownloadProvider.java | 5 ++++ .../download/BMCLAPIDownloadProvider.java | 8 ++++- .../download/BalancedDownloadProvider.java | 5 ++++ .../hmcl/download/DownloadProvider.java | 2 ++ .../hmcl/download/MojangDownloadProvider.java | 5 ++++ .../hmcl/download/RemoteVersion.java | 3 +- .../hmcl/download/game/GameRemoteVersion.java | 2 ++ .../hmcl/download/game/GameVersionList.java | 30 +++++++++++++------ .../org/jackhuang/hmcl/game/ReleaseType.java | 1 + 11 files changed, 57 insertions(+), 11 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java index e919424ed3..811617937f 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java @@ -196,6 +196,7 @@ private List loadVersions() { switch (it.getVersionType()) { case RELEASE: return chkRelease.isSelected(); + case PENDING: case SNAPSHOT: return chkSnapshot.isSelected(); case OLD: @@ -308,6 +309,7 @@ public void updateItem(RemoteVersion remoteVersion, boolean empty) { content.getTags().setAll(i18n("version.game.release")); content.setImage(VersionIconType.GRASS.getIcon()); break; + case PENDING: case SNAPSHOT: content.getTags().setAll(i18n("version.game.snapshot")); content.setImage(VersionIconType.COMMAND.getIcon()); diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AdaptedDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AdaptedDownloadProvider.java index dc729b1e10..09f1883508 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AdaptedDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AdaptedDownloadProvider.java @@ -48,6 +48,11 @@ public String getVersionListURL() { return getPreferredDownloadProvider().getVersionListURL(); } + @Override + public String getUvmcListURL() { + return getPreferredDownloadProvider().getUvmcListURL(); + } + @Override public String getAssetBaseURL() { return getPreferredDownloadProvider().getAssetBaseURL(); diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AutoDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AutoDownloadProvider.java index f2db0d6dd4..f7c814b3c5 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AutoDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AutoDownloadProvider.java @@ -40,6 +40,11 @@ public String getVersionListURL() { return versionListProvider.getVersionListURL(); } + @Override + public String getUvmcListURL() { + return versionListProvider.getUvmcListURL(); + } + @Override public String getAssetBaseURL() { return fileProvider.getAssetBaseURL(); diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java index f0244339f0..3f2a4402fd 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java @@ -77,7 +77,8 @@ public BMCLAPIDownloadProvider(String apiRoot) { pair("https://meta.fabricmc.net", apiRoot + "/fabric-meta"), pair("https://maven.fabricmc.net", apiRoot + "/maven"), pair("https://authlib-injector.yushi.moe", apiRoot + "/mirrors/authlib-injector"), - pair("https://repo1.maven.org/maven2", "https://mirrors.cloud.tencent.com/nexus/repository/maven-public") + pair("https://repo1.maven.org/maven2", "https://mirrors.cloud.tencent.com/nexus/repository/maven-public"), + pair("https://zkitefly.github.io/unlisted-versions-of-minecraft", "https://gitee.com/bleaker/unlisted-versions-of-minecraft/raw/main") ); } @@ -90,6 +91,11 @@ public String getVersionListURL() { return apiRoot + "/mc/game/version_manifest.json"; } + @Override + public String getUvmcListURL() { + return "https://gitee.com/bleaker/unlisted-versions-of-minecraft/raw/main/version_manifest.json"; + } + @Override public String getAssetBaseURL() { return apiRoot + "/assets/"; diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BalancedDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BalancedDownloadProvider.java index 32afd93b31..e2dd54827c 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BalancedDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BalancedDownloadProvider.java @@ -39,6 +39,11 @@ public String getVersionListURL() { throw new UnsupportedOperationException(); } + @Override + public String getUvmcListURL() { + throw new UnsupportedOperationException(); + } + @Override public String getAssetBaseURL() { throw new UnsupportedOperationException(); diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/DownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/DownloadProvider.java index a1f6fd45df..d6132009da 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/DownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/DownloadProvider.java @@ -33,6 +33,8 @@ public interface DownloadProvider { String getVersionListURL(); + String getUvmcListURL(); + String getAssetBaseURL(); default List getAssetObjectCandidates(String assetObjectLocation) { 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 a0a677f250..27396862b3 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java @@ -62,6 +62,11 @@ public String getVersionListURL() { return "https://piston-meta.mojang.com/mc/game/version_manifest.json"; } + @Override + public String getUvmcListURL() { + return "https://zkitefly.github.io/unlisted-versions-of-minecraft/version_manifest.json"; + } + @Override public String getAssetBaseURL() { return "https://resources.download.minecraft.net/"; diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/RemoteVersion.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/RemoteVersion.java index 4bc1a90c04..ea3f4155aa 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/RemoteVersion.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/RemoteVersion.java @@ -127,6 +127,7 @@ public enum Type { UNCATEGORIZED, RELEASE, SNAPSHOT, - OLD + OLD, + PENDING } } diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameRemoteVersion.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameRemoteVersion.java index 64b9a0e10e..1bdc9913d0 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameRemoteVersion.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameRemoteVersion.java @@ -68,6 +68,8 @@ private static Type getReleaseType(ReleaseType type) { return Type.SNAPSHOT; case UNKNOWN: return Type.UNCATEGORIZED; + case PENDING: + return Type.PENDING; default: return Type.OLD; } diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameVersionList.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameVersionList.java index 4d04b76a5e..990545c678 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameVersionList.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameVersionList.java @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.Collections; import java.util.concurrent.CompletableFuture; +import java.util.stream.Stream; /** * @@ -48,19 +49,30 @@ protected Collection getVersionsImpl(String gameVersion) { @Override public CompletableFuture refreshAsync() { - return HttpRequest.GET(downloadProvider.getVersionListURL()).getJsonAsync(GameRemoteVersions.class) - .thenAcceptAsync(root -> { + CompletableFuture primaryFuture = HttpRequest.GET(downloadProvider.getVersionListURL()) + .getJsonAsync(GameRemoteVersions.class); + + CompletableFuture uvmcFuture = HttpRequest.GET(downloadProvider.getUvmcListURL()) + .getJsonAsync(GameRemoteVersions.class); + + return CompletableFuture.allOf(primaryFuture, uvmcFuture) + .thenAcceptAsync(ignored -> { lock.writeLock().lock(); try { versions.clear(); - for (GameRemoteVersionInfo remoteVersion : root.getVersions()) { - versions.put(remoteVersion.getGameVersion(), new GameRemoteVersion( - remoteVersion.getGameVersion(), - remoteVersion.getGameVersion(), - Collections.singletonList(remoteVersion.getUrl()), - remoteVersion.getType(), remoteVersion.getReleaseTime())); - } + Stream.of(primaryFuture.join(), uvmcFuture.join()) + .flatMap(gameRemoteVersions -> gameRemoteVersions.getVersions().stream()) + .forEach(remoteVersion -> versions.put( + remoteVersion.getGameVersion(), + new GameRemoteVersion( + remoteVersion.getGameVersion(), + remoteVersion.getGameVersion(), + Collections.singletonList(remoteVersion.getUrl()), + remoteVersion.getType(), + remoteVersion.getReleaseTime() + ) + )); } finally { lock.writeLock().unlock(); } diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/game/ReleaseType.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/game/ReleaseType.java index 427efdffff..aa88ca4bdb 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/game/ReleaseType.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/game/ReleaseType.java @@ -27,6 +27,7 @@ public enum ReleaseType { MODIFIED("modified"), OLD_BETA("old-beta"), OLD_ALPHA("old-alpha"), + PENDING("pending"), UNKNOWN("unknown"); private final String id; From 51efdb03f297341d8a542c0f3d93b2fc24b4761e Mon Sep 17 00:00:00 2001 From: Zkitefly <2573874409@qq.com> Date: Tue, 20 Aug 2024 09:34:25 +0800 Subject: [PATCH 2/6] Update BMCLAPIDownloadProvider.java --- .../org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java index 3f2a4402fd..32774b8d7d 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java @@ -78,7 +78,7 @@ public BMCLAPIDownloadProvider(String apiRoot) { pair("https://maven.fabricmc.net", apiRoot + "/maven"), pair("https://authlib-injector.yushi.moe", apiRoot + "/mirrors/authlib-injector"), pair("https://repo1.maven.org/maven2", "https://mirrors.cloud.tencent.com/nexus/repository/maven-public"), - pair("https://zkitefly.github.io/unlisted-versions-of-minecraft", "https://gitee.com/bleaker/unlisted-versions-of-minecraft/raw/main") + pair("https://zkitefly.github.io/unlisted-versions-of-minecraft", "https://raw.gitcode.com/zkitefly/unlisted-versions-of-minecraft/raw/main") ); } @@ -93,7 +93,7 @@ public String getVersionListURL() { @Override public String getUvmcListURL() { - return "https://gitee.com/bleaker/unlisted-versions-of-minecraft/raw/main/version_manifest.json"; + return "https://raw.gitcode.com/zkitefly/unlisted-versions-of-minecraft/raw/main/version_manifest.json"; } @Override From aa1bc2761451529df32b375664f795991f92688b Mon Sep 17 00:00:00 2001 From: Zkitefly <2573874409@qq.com> Date: Tue, 20 Aug 2024 18:26:52 +0800 Subject: [PATCH 3/6] Update VersionsPage.java --- .../java/org/jackhuang/hmcl/ui/download/VersionsPage.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java index 811617937f..93eb6335dd 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java @@ -225,6 +225,7 @@ public void refresh() { chkRelease.setSelected(true); chkSnapshot.setSelected(true); chkOld.setSelected(true); + chkUvmc.setSelected(true); } else { list.getItems().setAll(items); } @@ -319,6 +320,9 @@ public void updateItem(RemoteVersion remoteVersion, boolean empty) { content.setImage(VersionIconType.CRAFT_TABLE.getIcon()); break; } + if (remoteVersion.getUrls().stream().anyMatch(url -> url.contains("unlisted-versions-of-minecraft"))) { + content.getTags().add("UVMC"); + } } else { VersionIconType iconType; if (remoteVersion instanceof LiteLoaderRemoteVersion) From c920f9d4d97054885ad8aadf5551bc4d87a79605 Mon Sep 17 00:00:00 2001 From: Zkitefly <2573874409@qq.com> Date: Tue, 20 Aug 2024 19:47:50 +0800 Subject: [PATCH 4/6] Update VersionsPage.java --- .../main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java | 1 - 1 file changed, 1 deletion(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java index 93eb6335dd..a34a75c868 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java @@ -225,7 +225,6 @@ public void refresh() { chkRelease.setSelected(true); chkSnapshot.setSelected(true); chkOld.setSelected(true); - chkUvmc.setSelected(true); } else { list.getItems().setAll(items); } From 255a0d5d9305adc5a39728440f8233d7e662e181 Mon Sep 17 00:00:00 2001 From: Zkitefly <2573874409@qq.com> Date: Fri, 22 Nov 2024 17:28:46 +0000 Subject: [PATCH 5/6] Update BMCLAPIDownloadProvider.java --- .../org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java index 32774b8d7d..e398110d81 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java @@ -78,7 +78,7 @@ public BMCLAPIDownloadProvider(String apiRoot) { pair("https://maven.fabricmc.net", apiRoot + "/maven"), pair("https://authlib-injector.yushi.moe", apiRoot + "/mirrors/authlib-injector"), pair("https://repo1.maven.org/maven2", "https://mirrors.cloud.tencent.com/nexus/repository/maven-public"), - pair("https://zkitefly.github.io/unlisted-versions-of-minecraft", "https://raw.gitcode.com/zkitefly/unlisted-versions-of-minecraft/raw/main") + pair("https://zkitefly.github.io/unlisted-versions-of-minecraft", "https://vip.123pan.cn/1821946486/unlisted-versions-of-minecraft") ); } @@ -93,7 +93,7 @@ public String getVersionListURL() { @Override public String getUvmcListURL() { - return "https://raw.gitcode.com/zkitefly/unlisted-versions-of-minecraft/raw/main/version_manifest.json"; + return "https://vip.123pan.cn/1821946486/unlisted-versions-of-minecraft/version_manifest.json"; } @Override From c41d944965bde7d7b44e978a820db6abde713ca8 Mon Sep 17 00:00:00 2001 From: Zkitefly <64117916+zkitefly@users.noreply.github.com> Date: Mon, 27 Jan 2025 14:43:06 +0000 Subject: [PATCH 6/6] update name --- .../java/org/jackhuang/hmcl/ui/download/VersionsPage.java | 2 +- .../jackhuang/hmcl/download/AdaptedDownloadProvider.java | 4 ++-- .../org/jackhuang/hmcl/download/AutoDownloadProvider.java | 4 ++-- .../jackhuang/hmcl/download/BMCLAPIDownloadProvider.java | 2 +- .../jackhuang/hmcl/download/BalancedDownloadProvider.java | 2 +- .../java/org/jackhuang/hmcl/download/DownloadProvider.java | 2 +- .../org/jackhuang/hmcl/download/MojangDownloadProvider.java | 2 +- .../org/jackhuang/hmcl/download/game/GameVersionList.java | 6 +++--- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java index a34a75c868..504135c05f 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java @@ -320,7 +320,7 @@ public void updateItem(RemoteVersion remoteVersion, boolean empty) { break; } if (remoteVersion.getUrls().stream().anyMatch(url -> url.contains("unlisted-versions-of-minecraft"))) { - content.getTags().add("UVMC"); + content.getTags().add("Unlisted Minecraft"); } } else { VersionIconType iconType; diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AdaptedDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AdaptedDownloadProvider.java index 09f1883508..3495cc4474 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AdaptedDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AdaptedDownloadProvider.java @@ -49,8 +49,8 @@ public String getVersionListURL() { } @Override - public String getUvmcListURL() { - return getPreferredDownloadProvider().getUvmcListURL(); + public String getUnlistedMinecraftURL() { + return getPreferredDownloadProvider().getUnlistedMinecraftURL(); } @Override diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AutoDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AutoDownloadProvider.java index f7c814b3c5..9d1bf7c200 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AutoDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/AutoDownloadProvider.java @@ -41,8 +41,8 @@ public String getVersionListURL() { } @Override - public String getUvmcListURL() { - return versionListProvider.getUvmcListURL(); + public String getUnlistedMinecraftURL() { + return versionListProvider.getUnlistedMinecraftURL(); } @Override diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java index e398110d81..00843d6ebb 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java @@ -92,7 +92,7 @@ public String getVersionListURL() { } @Override - public String getUvmcListURL() { + public String getUnlistedMinecraftURL() { return "https://vip.123pan.cn/1821946486/unlisted-versions-of-minecraft/version_manifest.json"; } diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BalancedDownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BalancedDownloadProvider.java index e2dd54827c..23e2ae0b89 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BalancedDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/BalancedDownloadProvider.java @@ -40,7 +40,7 @@ public String getVersionListURL() { } @Override - public String getUvmcListURL() { + public String getUnlistedMinecraftURL() { throw new UnsupportedOperationException(); } diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/DownloadProvider.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/DownloadProvider.java index d6132009da..99a2b21524 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/DownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/DownloadProvider.java @@ -33,7 +33,7 @@ public interface DownloadProvider { String getVersionListURL(); - String getUvmcListURL(); + String getUnlistedMinecraftURL(); String getAssetBaseURL(); 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 27396862b3..1e7b9acc59 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java @@ -63,7 +63,7 @@ public String getVersionListURL() { } @Override - public String getUvmcListURL() { + public String getUnlistedMinecraftURL() { return "https://zkitefly.github.io/unlisted-versions-of-minecraft/version_manifest.json"; } diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameVersionList.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameVersionList.java index 990545c678..afe1f86bb7 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameVersionList.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameVersionList.java @@ -52,16 +52,16 @@ public CompletableFuture refreshAsync() { CompletableFuture primaryFuture = HttpRequest.GET(downloadProvider.getVersionListURL()) .getJsonAsync(GameRemoteVersions.class); - CompletableFuture uvmcFuture = HttpRequest.GET(downloadProvider.getUvmcListURL()) + CompletableFuture unlistedMinecraftFuture = HttpRequest.GET(downloadProvider.getUnlistedMinecraftURL()) .getJsonAsync(GameRemoteVersions.class); - return CompletableFuture.allOf(primaryFuture, uvmcFuture) + return CompletableFuture.allOf(primaryFuture, unlistedMinecraftFuture) .thenAcceptAsync(ignored -> { lock.writeLock().lock(); try { versions.clear(); - Stream.of(primaryFuture.join(), uvmcFuture.join()) + Stream.of(primaryFuture.join(), unlistedMinecraftFuture.join()) .flatMap(gameRemoteVersions -> gameRemoteVersions.getVersions().stream()) .forEach(remoteVersion -> versions.put( remoteVersion.getGameVersion(),