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();