aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0763-Use-correct-LevelStem-registry-when-loading-default-.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2021-12-22 10:02:31 -0800
committerGitHub <[email protected]>2021-12-22 10:02:31 -0800
commit82eaf4ee15d77303cdd352cce9b33c2f3e5d14d7 (patch)
tree53e4a42978675fc17acc76b85dcb0c3569ab3e3b /patches/server/0763-Use-correct-LevelStem-registry-when-loading-default-.patch
parent6e5ceb34eb2ef4d6c0a35c46d0eded9099bb2fee (diff)
downloadPaper-82eaf4ee15d77303cdd352cce9b33c2f3e5d14d7.tar.gz
Paper-82eaf4ee15d77303cdd352cce9b33c2f3e5d14d7.zip
Fix duplicated BlockPistonRetractEvent call (#7111)
Diffstat (limited to 'patches/server/0763-Use-correct-LevelStem-registry-when-loading-default-.patch')
-rw-r--r--patches/server/0763-Use-correct-LevelStem-registry-when-loading-default-.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/server/0763-Use-correct-LevelStem-registry-when-loading-default-.patch b/patches/server/0763-Use-correct-LevelStem-registry-when-loading-default-.patch
new file mode 100644
index 0000000000..7cd2d9c9f6
--- /dev/null
+++ b/patches/server/0763-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 c245c1f4611f7273c8da629f774e0c64e9f98fc2..481a5dbad82f3f8dd5b1bf8ab207d82ec73d5bbd 100644
+--- a/src/main/java/net/minecraft/server/MinecraftServer.java
++++ b/src/main/java/net/minecraft/server/MinecraftServer.java
+@@ -635,7 +635,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
++ 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;
+