aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0640-Make-water-animal-spawn-height-configurable.patch
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2024-10-27 18:11:15 +0100
committerNassim Jahnke <[email protected]>2024-10-27 18:39:30 +0100
commit02bca1e6558bf4ac0cbf928d48e90f497b10b0a3 (patch)
tree1144072e447f4c0b7e80b278fd769106227f016a /patches/server/0640-Make-water-animal-spawn-height-configurable.patch
parent12ed02105177f54906a7d4422b235929426bc264 (diff)
downloadPaper-02bca1e6558bf4ac0cbf928d48e90f497b10b0a3.tar.gz
Paper-02bca1e6558bf4ac0cbf928d48e90f497b10b0a3.zip
Remove timings impl
Diffstat (limited to 'patches/server/0640-Make-water-animal-spawn-height-configurable.patch')
-rw-r--r--patches/server/0640-Make-water-animal-spawn-height-configurable.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/patches/server/0640-Make-water-animal-spawn-height-configurable.patch b/patches/server/0640-Make-water-animal-spawn-height-configurable.patch
new file mode 100644
index 0000000000..341b55b1f6
--- /dev/null
+++ b/patches/server/0640-Make-water-animal-spawn-height-configurable.patch
@@ -0,0 +1,21 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Brokkonaut <[email protected]>
+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
+index 6a8a90059dcc524a0724264c8d604bf39228a650..8c4532a250f8679d729a35c17e9b5bd339264450 100644
+--- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
++++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
+@@ -70,6 +70,10 @@ public abstract class WaterAnimal extends PathfinderMob {
+ ) {
+ int i = world.getSeaLevel();
+ int j = i - 13;
++ // Paper start - Make water animal spawn height configurable
++ i = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(i);
++ j = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(j);
++ // Paper end - Make water animal spawn height configurable
+ return pos.getY() >= j && pos.getY() <= i && world.getFluidState(pos.below()).is(FluidTags.WATER) && world.getBlockState(pos.above()).is(Blocks.WATER);
+ }
+ }