From a24d848933ee065f572babe9a0c8ff3a4a8de8a2 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke <nassim@njahnke.dev> Date: Fri, 21 May 2021 10:29:49 +0200 Subject: [PATCH] Fix force upgrade patch (#5699) --- .../Fix-and-optimise-world-force-upgrading.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Spigot-Server-Patches/Fix-and-optimise-world-force-upgrading.patch b/Spigot-Server-Patches/Fix-and-optimise-world-force-upgrading.patch index 41f4e1b70f..81796c6cef 100644 --- a/Spigot-Server-Patches/Fix-and-optimise-world-force-upgrading.patch +++ b/Spigot-Server-Patches/Fix-and-optimise-world-force-upgrading.patch @@ -394,3 +394,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 long j = BiomeManager.a(creator.seed()); List<MobSpawner> list = ImmutableList.of(new MobSpawnerPhantom(), new MobSpawnerPatrol(), new MobSpawnerCat(), new VillageSiege(), new MobSpawnerTrader(worlddata)); +@@ -0,0 +0,0 @@ public final class CraftServer implements Server { + chunkgenerator = worlddimension.c(); + } + ++ // Paper start - fix and optimise world upgrading ++ if (console.options.has("forceUpgrade")) { ++ net.minecraft.server.Main.convertWorldButItWorks( ++ actualDimension, net.minecraft.world.level.World.getDimensionKey(dimensionmanager), worldSession.getLevelName(), DataConverterRegistry.getDataFixer(), console.options.has("eraseCache") ++ ); ++ } ++ // Paper end - fix and optimise world upgrading ++ + ResourceKey<net.minecraft.world.level.World> worldKey; + String levelName = this.getServer().getDedicatedServerProperties().levelName; + if (name.equals(levelName + "_nether")) {