diff --git a/patches/server/Add-configurable-height-for-slime-spawn.patch b/patches/server/Add-configurable-height-for-slime-spawn.patch index e4776cd7cc..d6f4ec872b 100644 --- a/patches/server/Add-configurable-height-for-slime-spawn.patch +++ b/patches/server/Add-configurable-height-for-slime-spawn.patch @@ -14,9 +14,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (world.getDifficulty() != Difficulty.PEACEFUL) { - if (world.getBiome(pos).is(BiomeTags.ALLOWS_SURFACE_SLIME_SPAWNS) && pos.getY() > 50 && pos.getY() < 70 && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) { + // Paper start - Replace rules for Height in Swamp Biome -+ final double maxHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.swampBiome.maximum; -+ final double minHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.swampBiome.minimum; -+ if (world.getBiome(pos).is(net.minecraft.world.level.biome.Biomes.SWAMP) && pos.getY() > minHeightSwamp && pos.getY() < maxHeightSwamp && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) { ++ final double maxHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.surfaceBiome.maximum; ++ final double minHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.surfaceBiome.minimum; ++ if (world.getBiome(pos).is(BiomeTags.ALLOWS_SURFACE_SLIME_SPAWNS) && pos.getY() > minHeightSwamp && pos.getY() < maxHeightSwamp && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) { + // Paper end return checkMobSpawnRules(type, world, spawnReason, pos, random); } diff --git a/patches/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch b/patches/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch index 720246593f..26688633df 100644 --- a/patches/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch +++ b/patches/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch @@ -20,5 +20,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end // Paper start - Replace rules for Height in Swamp Biome - final double maxHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.swampBiome.maximum; - final double minHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.swampBiome.minimum; + final double maxHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.surfaceBiome.maximum; + final double minHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.surfaceBiome.minimum; diff --git a/patches/server/Paper-config-files.patch b/patches/server/Paper-config-files.patch index 7b29effbd8..f476cf11bf 100644 --- a/patches/server/Paper-config-files.patch +++ b/patches/server/Paper-config-files.patch @@ -1444,9 +1444,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + public class SlimeSpawnHeight extends ConfigurationPart { + -+ public SwampBiome swampBiome; ++ public SurfaceSpawnableSlimeBiome surfaceBiome; + -+ public class SwampBiome extends ConfigurationPart { ++ public class SurfaceSpawnableSlimeBiome extends ConfigurationPart { + public double maximum = 70; + public double minimum = 50; + } @@ -3244,6 +3244,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + moveFromRoot(builder, "spawn-limits", "entities", "spawning"); + moveFromRoot(builder, "despawn-ranges", "entities", "spawning"); + moveFromRoot(builder, "wateranimal-spawn-height", "entities", "spawning"); ++ builder.addAction(path("slime-spawn-height", "swamp-biome"), TransformAction.rename("surface-biome")); + moveFromRoot(builder, "slime-spawn-height", "entities", "spawning"); + moveFromRoot(builder, "wandering-trader", "entities", "spawning"); + moveFromRoot(builder, "all-chunks-are-slime-chunks", "entities", "spawning");