From 3dcbdc73bd7b5cc15806da319c0bdec2d6c968d7 Mon Sep 17 00:00:00 2001 From: Nassim Date: Fri, 21 May 2021 10:29:49 +0200 Subject: [PATCH] Fix force upgrade patch (#5699) --- ...Fix-and-optimise-world-force-upgrading.patch | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/0737-Fix-and-optimise-world-force-upgrading.patch b/Spigot-Server-Patches/0737-Fix-and-optimise-world-force-upgrading.patch index dedf5a395e..1017b90f0f 100644 --- a/Spigot-Server-Patches/0737-Fix-and-optimise-world-force-upgrading.patch +++ b/Spigot-Server-Patches/0737-Fix-and-optimise-world-force-upgrading.patch @@ -375,7 +375,7 @@ index ebb0d6988f87013ea5d523ab4a1b31cb669ccc43..74d826853389b8e01ffe2b076cf2b179 return this.cache.getAndMoveToFirst(ChunkCoordIntPair.pair(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ())); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c51e9b50323f5e33bad5fd25d74c572241377059..2483d25014dd6a1031dd0f2c27b2e6e9b51f2887 100644 +index c51e9b50323f5e33bad5fd25d74c572241377059..ff79c13bc7717eb9529e802b8e31a1f756b02f97 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1147,14 +1147,7 @@ public final class CraftServer implements Server { @@ -394,3 +394,18 @@ index c51e9b50323f5e33bad5fd25d74c572241377059..2483d25014dd6a1031dd0f2c27b2e6e9 long j = BiomeManager.a(creator.seed()); List list = ImmutableList.of(new MobSpawnerPhantom(), new MobSpawnerPatrol(), new MobSpawnerCat(), new VillageSiege(), new MobSpawnerTrader(worlddata)); +@@ -1171,6 +1164,14 @@ 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 worldKey; + String levelName = this.getServer().getDedicatedServerProperties().levelName; + if (name.equals(levelName + "_nether")) {