aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBillyGalbreath <[email protected]>2021-12-28 13:15:04 -0600
committerGitHub <[email protected]>2021-12-28 11:15:04 -0800
commit5883773e373722445bd8acd8c6dd09d59a3ae92b (patch)
tree2244e1a6cb363b2992ee6aeb15f53ff7048e6510
parent6cb62bf003d0632e78acc23e100badb3a5cc51d0 (diff)
downloadPaper-5883773e373722445bd8acd8c6dd09d59a3ae92b.tar.gz
Paper-5883773e373722445bd8acd8c6dd09d59a3ae92b.zip
Fix Chunk#isSlimeChunk when all-chunks-are-slime-chunks is true (#7211)
-rw-r--r--patches/server/0048-All-chunks-are-slime-spawn-chunks-toggle.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/patches/server/0048-All-chunks-are-slime-spawn-chunks-toggle.patch b/patches/server/0048-All-chunks-are-slime-spawn-chunks-toggle.patch
index e07c3ca95b..a0397bbaec 100644
--- a/patches/server/0048-All-chunks-are-slime-spawn-chunks-toggle.patch
+++ b/patches/server/0048-All-chunks-are-slime-spawn-chunks-toggle.patch
@@ -31,3 +31,16 @@ index 19a2702d9053037203c192d7f26f3c9afbe6f782..11aefbf65b0e63777d6ed5bfdb18c7f7
if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
return checkMobSpawnRules(type, world, spawnReason, pos, random);
+diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+index 92a33a23764e8ca1e2e6b2b0feb6caca2a5dfc56..6c47771e0168e958b22c987bcd8bc100f6208c10 100644
+--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
++++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+@@ -218,7 +218,7 @@ public class CraftChunk implements Chunk {
+ @Override
+ public boolean isSlimeChunk() {
+ // 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk
+- return WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), worldServer.spigotConfig.slimeSeed).nextInt(10) == 0;
++ return this.worldServer.paperConfig.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), worldServer.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
+ }
+
+ @Override