From a6dd9f7a681a571f2ac6ae8408ca92c05198833b Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Sat, 18 Dec 2021 08:26:55 +0100 Subject: [PATCH] Make water animal spawn height configurable --- .../world/entity/animal/WaterAnimal.java.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/WaterAnimal.java.patch diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/WaterAnimal.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/WaterAnimal.java.patch new file mode 100644 index 0000000000..5089fd98c0 --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/WaterAnimal.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/world/entity/animal/WaterAnimal.java ++++ b/net/minecraft/world/entity/animal/WaterAnimal.java +@@ -70,6 +70,10 @@ + ) { + int i = world.getSeaLevel(); + int j = i - 13; ++ // Paper start - Make water animal spawn height configurable ++ i = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(i); ++ j = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(j); ++ // Paper end - Make water animal spawn height configurable + return pos.getY() >= j && pos.getY() <= i && world.getFluidState(pos.below()).is(FluidTags.WATER) && world.getBlockState(pos.above()).is(Blocks.WATER); + } + }