From 8563db365477a6fde86b8aaf2110ae742acf4bca Mon Sep 17 00:00:00 2001 From: mineDiamond Date: Fri, 21 Nov 2025 22:06:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AF=B9=201.21.11-pre1/2=5F?= =?UTF-8?q?unobfuscated=20=E7=9A=84=E6=94=AF=E6=8C=81=20(#4829)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Glavo --- .../jackhuang/hmcl/util/i18n/MinecraftWiki.java | 4 +--- .../resources/assets/game/unlisted-versions.json | 14 ++++++++++++++ .../src/main/resources/assets/game/versions.txt | 6 +++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/util/i18n/MinecraftWiki.java b/HMCL/src/main/java/org/jackhuang/hmcl/util/i18n/MinecraftWiki.java index a93219c61..4a5edc2ad 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/util/i18n/MinecraftWiki.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/util/i18n/MinecraftWiki.java @@ -30,7 +30,7 @@ public final class MinecraftWiki { private static final Pattern SNAPSHOT_PATTERN = Pattern.compile("^[0-9]{2}w[0-9]{2}.+$"); public static String getWikiLink(SupportedLocale locale, GameRemoteVersion version) { - String wikiVersion = version.getSelfVersion(); + String wikiVersion = StringUtils.removeSuffix(version.getSelfVersion(), "_unobfuscated"); var gameVersion = GameVersionNumber.asGameVersion(wikiVersion); if (locale.getLocale().getLanguage().equals("lzh")) { @@ -80,8 +80,6 @@ public final class MinecraftWiki { if (SNAPSHOT_PATTERN.matcher(wikiVersion).matches()) { if (wikiVersion.equals("22w13oneblockatatime")) wikiVersion = "22w13oneBlockAtATime"; - else - wikiVersion = StringUtils.removeSuffix(wikiVersion, "_unobfuscated"); return locale.i18n("wiki.version.game.snapshot", wikiVersion) + variantSuffix; } } diff --git a/HMCLCore/src/main/resources/assets/game/unlisted-versions.json b/HMCLCore/src/main/resources/assets/game/unlisted-versions.json index 2086ead2c..11252b05a 100644 --- a/HMCLCore/src/main/resources/assets/game/unlisted-versions.json +++ b/HMCLCore/src/main/resources/assets/game/unlisted-versions.json @@ -1,5 +1,19 @@ { "versions": [ + { + "id": "1.21.11-pre2_unobfuscated", + "type": "unobfuscated", + "url": "https://piston-meta.mojang.com/v1/packages/2955ce0af0512fdfe53ff0740b017344acf6f397/1.21.11-pre2_unobfuscated.json", + "time": "2025-11-21T12:07:21+00:00", + "releaseTime": "2025-11-21T12:07:21+00:00" + }, + { + "id": "1.21.11-pre1_unobfuscated", + "type": "unobfuscated", + "url": "https://piston-meta.mojang.com/v1/packages/9c267f8dda2728bae55201a753cdd07b584709f1/1.21.11-pre1_unobfuscated.json", + "time": "2025-11-19T08:30:46+00:00", + "releaseTime": "2025-11-19T08:30:46+00:00" + }, { "id": "25w46a_unobfuscated", "type": "unobfuscated", diff --git a/HMCLCore/src/main/resources/assets/game/versions.txt b/HMCLCore/src/main/resources/assets/game/versions.txt index 6f1e2d319..70bc89833 100644 --- a/HMCLCore/src/main/resources/assets/game/versions.txt +++ b/HMCLCore/src/main/resources/assets/game/versions.txt @@ -856,4 +856,8 @@ 25w45a 25w45a_unobfuscated 25w46a -25w46a_unobfuscated \ No newline at end of file +25w46a_unobfuscated +1.21.11-pre1 +1.21.11-pre1_unobfuscated +1.21.11-pre2 +1.21.11-pre2_unobfuscated \ No newline at end of file