1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-03-21 22:48:57 +01:00

Fix Squid and Dolphin spawn height ()

This commit is contained in:
Roni Äikäs 2025-02-08 21:24:07 +02:00 committed by GitHub
parent 786ddf53c6
commit cb6c57e0f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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)