Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit 32c1652

Browse files
BillyGalbreathgranny
authored andcommitted
MC-238526 - Fix spawner not spawning water animals correctly
1 parent 7dc84c9 commit 32c1652

3 files changed

Lines changed: 14 additions & 33 deletions

File tree

patches/server/0232-MC-238526-Fix-spawner-not-spawning-water-animals-cor.patch

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--- a/net/minecraft/world/entity/animal/WaterAnimal.java
2+
+++ b/net/minecraft/world/entity/animal/WaterAnimal.java
3+
@@ -74,8 +_,7 @@
4+
seaLevel = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(seaLevel);
5+
i = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(i);
6+
// Paper end - Make water animal spawn height configurable
7+
- return pos.getY() >= i
8+
- && pos.getY() <= seaLevel
9+
+ return ((spawnReason == EntitySpawnReason.SPAWNER && level.getMinecraftWorld().purpurConfig.spawnerFixMC238526) || (pos.getY() >= i && pos.getY() <= seaLevel)) // Purpur - MC-238526 - Fix spawner not spawning water animals correctly
10+
&& level.getFluidState(pos.below()).is(FluidTags.WATER)
11+
&& level.getBlockState(pos.above()).is(Blocks.WATER);
12+
}

purpur-server/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,8 +1029,10 @@ private void slabSettings() {
10291029
}
10301030

10311031
public boolean spawnerDeactivateByRedstone = false;
1032+
public boolean spawnerFixMC238526 = false;
10321033
private void spawnerSettings() {
10331034
spawnerDeactivateByRedstone = getBoolean("blocks.spawner.deactivate-by-redstone", spawnerDeactivateByRedstone);
1035+
spawnerFixMC238526 = getBoolean("blocks.spawner.fix-mc-238526", spawnerFixMC238526);
10341036
}
10351037

10361038
public int spongeAbsorptionArea = 65;

0 commit comments

Comments
 (0)