From 5883773e373722445bd8acd8c6dd09d59a3ae92b Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Tue, 28 Dec 2021 13:15:04 -0600 Subject: [PATCH] Fix Chunk#isSlimeChunk when all-chunks-are-slime-chunks is true (#7211) --- ...8-All-chunks-are-slime-spawn-chunks-toggle.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 e07c3ca95..a0397bbae 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