From 0000000000000000000000000000000000000000 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 diff --git a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java index 7ef707f0098f2663ebc0ef0f5b35897c9d33c1cf..75884a9e69a28404752c1a2cf854335bb78cac01 100644 --- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java +++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java @@ -74,6 +74,10 @@ public abstract class WaterAnimal extends PathfinderMob { ) { 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); } }