3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Dieser Commit ist enthalten in:
Jason 2021-11-12 14:27:26 -08:00 committet von GitHub
Ursprung cc2ecbc407
Commit 4d6073faff
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -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<TickTa
@@ -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
+ 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