mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 16:34:44 +01:00
6e71f41536
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: 65247583f SPIGOT-7857: Improve ItemMeta block data deserialization 05d80500d SPIGOT-7857: Fix spurious internal NBT tag when deserializing BlockStateMeta cebb58e9a SPIGOT-7804: Fix written book serialization efcdd5d38 SPIGOT-7794: Cancelling InventoryItemMoveEvent destroys items b568ba572 SPIGOT-7789: Fix NPE in CraftMetaFirework applyToItem f057cf449 Remove outdated build delay Spigot Changes: f6a48054 SPIGOT-7835: Fix issue with custom hopper settings bb63b137 Rebuild patches e1142b4d Rebuild patches
22 lines
1.2 KiB
Diff
22 lines
1.2 KiB
Diff
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
|
|
index f74cfa008886e0b74b850982d60ceb8879243c36..6f22705072fecbe91196e4966fca2eeec060f120 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
|
@@ -68,6 +68,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);
|
|
}
|
|
}
|