Skip to content

Commit 1b2d22f

Browse files
committed
Fix world conversion and renaming
1 parent bffb1ab commit 1b2d22f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

  • station-gui-api-v0/src/main/java/net/modificationstation/stationapi/impl/client/gui/screen
  • station-vanilla-fix-v0/src/main/java/net/modificationstation/stationapi/impl/vanillafix/client/gui/screen

station-gui-api-v0/src/main/java/net/modificationstation/stationapi/impl/client/gui/screen/EditWorldScreenImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public final class EditWorldScreenImpl {
1919
private static void registerRenameWorld(EditWorldScreenEvent.ScrollableButtonContextRegister event) {
2020
event.contexts.add(screen -> new ButtonWidgetDetachedContext(
2121
id -> new ButtonWidget(id, 0, 0, I18n.getTranslation("selectWorld.rename")),
22-
button -> ((ScreenAccessor) screen).getMinecraft().setScreen(new EditWorldScreen(screen, screen.worldData.method_1958()))
22+
button -> ((ScreenAccessor) screen).getMinecraft().setScreen(new EditWorldScreen(screen, screen.worldData.method_1956()))
2323
));
2424
}
2525
}

station-vanilla-fix-v0/src/main/java/net/modificationstation/stationapi/impl/vanillafix/client/gui/screen/EditWorldScreenImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private static void registerConversionButton(EditWorldScreenEvent.ScrollableButt
4545
FlattenedWorldStorage worldStorage = (FlattenedWorldStorage) mc.method_2127();
4646
mc.field_2817.method_1491("Converting World to " + worldStorage.getPreviousWorldFormat());
4747
mc.field_2817.method_1796("This may take a while :)");
48-
worldStorage.convertWorld(screen.worldData.method_1958(), (type, compound) -> (NbtCompound) VanillaDataFixerImpl.DATA_DAMAGER.get().update(type, new Dynamic<>(NbtOps.INSTANCE, compound).remove(DataFixers.DATA_VERSIONS), VanillaDataFixerImpl.HIGHEST_VERSION - NbtHelper.getDataVersions(compound).getInt(NAMESPACE.toString()), VanillaDataFixerImpl.VANILLA_VERSION).getValue(), mc.field_2817);
48+
worldStorage.convertWorld(screen.worldData.method_1956(), (type, compound) -> (NbtCompound) VanillaDataFixerImpl.DATA_DAMAGER.get().update(type, new Dynamic<>(NbtOps.INSTANCE, compound).remove(DataFixers.DATA_VERSIONS), VanillaDataFixerImpl.HIGHEST_VERSION - NbtHelper.getDataVersions(compound).getInt(NAMESPACE.toString()), VanillaDataFixerImpl.VANILLA_VERSION).getValue(), mc.field_2817);
4949
mc.setScreen(screen);
5050
}, WorldConversionWarning.TO_MCREGION_EXPLANATION_KEY, WorldConversionWarning.CONVERT_KEY))
5151
));

0 commit comments

Comments
 (0)