From c2d5a07053a634be3a60f608abb4459f1eff6c75 Mon Sep 17 00:00:00 2001 From: Wulian233 <1055917385@qq.com> Date: Sat, 13 Sep 2025 20:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E5=8C=85?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=9C=A8=E4=BD=8E=E4=BA=8E1.13=E7=9A=84?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=84=8F=E5=A4=96=E5=87=BA=E7=8E=B0=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#4428)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hmcl/ui/versions/WorldManagePage.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/WorldManagePage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/WorldManagePage.java index bd479e7e2..4109b9e01 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/WorldManagePage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/WorldManagePage.java @@ -68,11 +68,6 @@ public final class WorldManagePage extends DecoratorAnimatedPage implements Deco this.state = new SimpleObjectProperty<>(State.fromTitle(i18n("world.manage.title", world.getWorldName()))); this.header = new TabHeader(worldInfoTab, worldBackupsTab); - if (world.getGameVersion() != null && // old game will not write game version to level.dat - GameVersionNumber.compare(world.getGameVersion(), "1.13") >= 0) { - header.getTabs().add(datapackTab); - } - worldInfoTab.setNodeSupplier(() -> new WorldInfoPage(this)); worldBackupsTab.setNodeSupplier(() -> new WorldBackupsPage(this)); datapackTab.setNodeSupplier(() -> new DatapackListPage(this)); @@ -90,8 +85,14 @@ public final class WorldManagePage extends DecoratorAnimatedPage implements Deco AdvancedListBox sideBar = new AdvancedListBox() .addNavigationDrawerTab(header, worldInfoTab, i18n("world.info"), SVG.INFO) - .addNavigationDrawerTab(header, worldBackupsTab, i18n("world.backup"), SVG.ARCHIVE) - .addNavigationDrawerTab(header, datapackTab, i18n("world.datapack"), SVG.EXTENSION); + .addNavigationDrawerTab(header, worldBackupsTab, i18n("world.backup"), SVG.ARCHIVE); + + if (world.getGameVersion() != null && // old game will not write game version to level.dat + GameVersionNumber.asGameVersion(world.getGameVersion()).isAtLeast("1.13", "17w43a")) { + header.getTabs().add(datapackTab); + sideBar.addNavigationDrawerTab(header, datapackTab, i18n("world.datapack"), SVG.EXTENSION); + } + left.setTop(sideBar); AdvancedListBox toolbar = new AdvancedListBox();