2022-06-09 10:51:45 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Brokkonaut <hannos17@gmx.de>
|
|
|
|
Date: Sat, 18 Dec 2021 08:26:55 +0100
|
|
|
|
Subject: [PATCH] Make water animal spawn height configurable
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
2024-10-23 22:52:43 +02:00
|
|
|
index 6a8a90059dcc524a0724264c8d604bf39228a650..8c4532a250f8679d729a35c17e9b5bd339264450 100644
|
2022-06-09 10:51:45 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
2024-10-23 22:52:43 +02:00
|
|
|
@@ -70,6 +70,10 @@ public abstract class WaterAnimal extends PathfinderMob {
|
2024-04-12 21:14:06 +02:00
|
|
|
) {
|
2022-06-09 10:51:45 +02:00
|
|
|
int i = world.getSeaLevel();
|
|
|
|
int j = i - 13;
|
2024-01-18 22:00:40 +01:00
|
|
|
+ // Paper start - Make water animal spawn height configurable
|
2022-06-09 10:51:45 +02:00
|
|
|
+ i = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(i);
|
|
|
|
+ j = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(j);
|
2024-01-18 22:00:40 +01:00
|
|
|
+ // Paper end - Make water animal spawn height configurable
|
2022-06-09 10:51:45 +02:00
|
|
|
return pos.getY() >= j && pos.getY() <= i && world.getFluidState(pos.below()).is(FluidTags.WATER) && world.getBlockState(pos.above()).is(Blocks.WATER);
|
|
|
|
}
|
|
|
|
}
|