Paper/patches/unapplied/server/0826-Use-correct-LevelStem-registry-when-loading-default-.patch

28 lines
1.5 KiB
Diff
Raw Normal View History

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
2021-11-12 23:27:26 +01:00
index 57cb2722e973cfc8edc845bc7154b8b8bbb11e12..5a4172faaf960d48939d6a485719041987df9242 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
2021-11-12 23:27:26 +01:00
@@ -641,7 +641,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) registrymaterials.get(dimensionKey);
+ // Paper start - Use correct LevelStem registry
2021-11-12 23:27:26 +01:00
+ 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;