mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Fix Squid and Dolphin spawn height (#12045)
This commit is contained in:
@@ -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)
|
Reference in New Issue
Block a user