From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> 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 7e15aa7c156096decdaa8596f242a4b2e5ea97b4..309e960ba7678e09d7eb7af11f57e5c3ff4f3d9e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -634,7 +634,14 @@ 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 + final LevelStem worlddimension; + if (dimensionKey == LevelStem.END || dimensionKey == LevelStem.NETHER) { + worlddimension = generatorsettings.dimensions().get(dimensionKey); + } else { + worlddimension = registrymaterials.get(dimensionKey); + } + // Paper end DimensionType dimensionmanager; ChunkGenerator chunkgenerator;