mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@850b736 Close PRs opened from orgs or bot accounts (#10281) PaperMC/Paper@54a2340 check if itemstack is stackable first (#10285) PaperMC/Paper@9c4bb0d add rich message component support to configuration (#10225) PaperMC/Paper@8870d22 Fire EntityDamageByEntityEvent for unowned wither skulls patch (#10244) PaperMC/Paper@bbc03d8 improve BanList types (#10239) PaperMC/Paper@ce5c8dd Configurable max block/fluid ticks (#10266) PaperMC/Paper@880fef7 Deprecate extra ban methods with raw BanEntry (#9580) PaperMC/Paper@60218cd Don't tick empty worlds (#9025) PaperMC/Paper@b21eb4d add overloads to use suspicious effect entry to mushroom cow and suspicious stew meta (#10245) PaperMC/Paper@89d51d5 Allow enabling sand duping (#10191) PaperMC/Paper@6ad63fb Per world ticks per spawn settings (#6891)
34 lines
2.2 KiB
Diff
34 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <Blake.Galbreath@Gmail.com>
|
|
Date: Sun, 30 Jan 2022 02:03:34 -0600
|
|
Subject: [PATCH] MC-238526 - Fix spawner not spawning water animals correctly
|
|
|
|
|
|
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 9b897cf53f4bb5d366e6ac88dbed93c59d8fe541..fc61f93e04e5bc893b89c746deb2b89c5be0d602 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
|
@@ -77,6 +77,6 @@ public abstract class WaterAnimal extends PathfinderMob {
|
|
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);
|
|
+ return ((reason == MobSpawnType.SPAWNER && world.getMinecraftWorld().purpurConfig.spawnerFixMC238526) || (pos.getY() >= j && pos.getY() <= i)) && world.getFluidState(pos.below()).is(FluidTags.WATER) && world.getBlockState(pos.above()).is(Blocks.WATER); // Purpur
|
|
}
|
|
}
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
index a1b2c5ea3687fc0cfc3c1b9e170aa801c9cc541c..a07d11bd3abdb77e16a7cb7db498690c4326613f 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -1053,8 +1053,10 @@ public class PurpurWorldConfig {
|
|
}
|
|
|
|
public boolean spawnerDeactivateByRedstone = false;
|
|
+ public boolean spawnerFixMC238526 = false;
|
|
private void spawnerSettings() {
|
|
spawnerDeactivateByRedstone = getBoolean("blocks.spawner.deactivate-by-redstone", spawnerDeactivateByRedstone);
|
|
+ spawnerFixMC238526 = getBoolean("blocks.spawner.fix-mc-238526", spawnerFixMC238526);
|
|
}
|
|
|
|
public int spongeAbsorptionArea = 65;
|