Fix Squid and Dolphin spawn height (#12045)

This commit is contained in:
Roni Äikäs
2025-02-08 21:24:07 +02:00
committed by GitHub
parent 786ddf53c6
commit cb6c57e0f8

View File

@@ -0,0 +1,13 @@
--- a/net/minecraft/world/entity/animal/AgeableWaterCreature.java
+++ b/net/minecraft/world/entity/animal/AgeableWaterCreature.java
@@ -68,6 +_,10 @@
) {
int seaLevel = level.getSeaLevel();
int i = seaLevel - 13;
+ // Paper start - Make water animal spawn height configurable
+ seaLevel = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(seaLevel);
+ i = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(i);
+ // Paper end - Make water animal spawn height configurable
return pos.getY() >= i
&& pos.getY() <= seaLevel
&& level.getFluidState(pos.below()).is(FluidTags.WATER)