mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-21 22:48:57 +01:00
Fix Squid and Dolphin spawn height (#12045)
This commit is contained in:
parent
786ddf53c6
commit
cb6c57e0f8
1 changed files with 13 additions and 0 deletions
|
@ -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)
|
Loading…
Add table
Reference in a new issue