From dbdad4bae919199805da9e2b56236ed4601da861 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) --- .../All-chunks-are-slime-spawn-chunks-toggle.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/patches/server/All-chunks-are-slime-spawn-chunks-toggle.patch b/patches/server/All-chunks-are-slime-spawn-chunks-toggle.patch index 5d628f686a..0c4e4c9d5e 100644 --- a/patches/server/All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/patches/server/All-chunks-are-slime-spawn-chunks-toggle.patch @@ -31,3 +31,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +@@ -0,0 +0,0 @@ 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