diff options
Diffstat (limited to 'patches/server/0760-Use-correct-LevelStem-registry-when-loading-default-.patch')
-rw-r--r-- | patches/server/0760-Use-correct-LevelStem-registry-when-loading-default-.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/server/0760-Use-correct-LevelStem-registry-when-loading-default-.patch b/patches/server/0760-Use-correct-LevelStem-registry-when-loading-default-.patch new file mode 100644 index 0000000000..53e2e20e8f --- /dev/null +++ b/patches/server/0760-Use-correct-LevelStem-registry-when-loading-default-.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jason Penilla <[email protected]> +Date: Sat, 16 Oct 2021 17:38:35 -0700 +Subject: [PATCH] Use correct LevelStem registry when loading default + end/nether + + +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index ee33fd892e97e1ffea259a4f7974675923377d6b..dff3ce704d44d13a250b9a6ae1ec1768e4a8187a 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -565,7 +565,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa + long i = generatorsettings.seed(); + long j = BiomeManager.obfuscateSeed(i); + List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(iworlddataserver)); +- LevelStem worlddimension = (LevelStem) iregistry.get(dimensionKey); ++ // Paper start - Use correct LevelStem registry ++ final LevelStem worlddimension; ++ if (dimensionKey == LevelStem.END || dimensionKey == LevelStem.NETHER) { ++ worlddimension = generatorsettings.dimensions().get(dimensionKey); ++ } else { ++ worlddimension = iregistry.get(dimensionKey); ++ } ++ // Paper end + Holder<DimensionType> holder; + ChunkGenerator chunkgenerator; + |