8000 Fix Squid and Dolphin spawn height (#12045) · PaperMC/Paper@cb6c57e · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit cb6c57e

Browse files
authored
Fix Squid and Dolphin spawn height (#12045)
1 parent 786ddf5 commit cb6c57e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--- a/net/minecraft/world/entity/animal/AgeableWaterCreature.java
2+
+++ b/net/minecraft/world/entity/animal/AgeableWaterCreature.java
3+
@@ -68,6 +_,10 @@
4+
) {
5+
int seaLevel = level.getSeaLevel();
6< 5B13 code class="diff-text syntax-highlighted-line addition">+
int i = seaLevel - 13;
7+
+ // Paper start - Make water animal spawn height configurable
8+
+ seaLevel = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(seaLevel);
9+
+ i = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(i);
10+
+ // Paper end - Make water animal spawn height configurable
11+
return pos.getY() >= i
12+
&& pos.getY() <= seaLevel
13+
&& level.getFluidState(pos.below()).is(FluidTags.WATER)

0 commit comments

Comments
 (0)
0