From 4d6073faffa115b6c427732159da2666e1de6647 Mon Sep 17 00:00:00 2001 From: Jason <11360596+jpenilla@users.noreply.github.com> Date: Fri, 12 Nov 2021 14:27:26 -0800 Subject: [PATCH] Partially fix #6880 (#6888) --- ...rect-LevelStem-registry-when-loading-default-.patch | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/patches/server/0826-Use-correct-LevelStem-registry-when-loading-default-.patch b/patches/server/0826-Use-correct-LevelStem-registry-when-loading-default-.patch index d48bb37e54..1fdfe05599 100644 --- a/patches/server/0826-Use-correct-LevelStem-registry-when-loading-default-.patch +++ b/patches/server/0826-Use-correct-LevelStem-registry-when-loading-default-.patch @@ -6,17 +6,19 @@ Subject: [PATCH] Use correct LevelStem registry when loading default diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c8876b000a03f18e7a140167ed4505a9843a8d14..7636b0ae9031e06fd8b4a0c359a45a17e6e075de 100644 +index 57cb2722e973cfc8edc845bc7154b8b8bbb11e12..5a4172faaf960d48939d6a485719041987df9242 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -641,7 +641,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(iworlddataserver)); - LevelStem worlddimension = (LevelStem) registrymaterials.get(dimensionKey); + // Paper start - Use correct LevelStem registry -+ LevelStem worlddimension = generatorsettings.dimensions().get(dimensionKey); -+ if (worlddimension == null) { ++ final LevelStem worlddimension; ++ if (dimensionKey == LevelStem.END || dimensionKey == LevelStem.NETHER) { ++ worlddimension = generatorsettings.dimensions().get(dimensionKey); ++ } else { + worlddimension = registrymaterials.get(dimensionKey); + } + // Paper end