mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-11 01:51:37 +01:00
Make water animal spawn height configurable
This commit is contained in:
parent
5be900b223
commit
a6dd9f7a68
@ -0,0 +1,13 @@
|
|||||||
|
--- a/net/minecraft/world/entity/animal/WaterAnimal.java
|
||||||
|
+++ b/net/minecraft/world/entity/animal/WaterAnimal.java
|
||||||
|
@@ -70,6 +70,10 @@
|
||||||
|
) {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user