mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-22 16:29:26 +00:00
44 lines
2.5 KiB
Diff
44 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MartijnMuijsers <martijnmuijsers@live.nl>
|
|
Date: Tue, 29 Nov 2022 16:16:35 +0100
|
|
Subject: [PATCH] Fix MC-238526
|
|
|
|
License: MIT (https://opensource.org/licenses/MIT)
|
|
|
|
This patch is based on the following patch:
|
|
"MC-238526 - Fix spawner not spawning water animals correctly"
|
|
By: BillyGalbreath <Blake.Galbreath@Gmail.com>
|
|
As part of: Purpur (https://github.com/PurpurMC/Purpur)
|
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
|
|
|
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 18389f46902bb9879ac6d734723e9a720724dc48..613970368890d78ab589f654a66024eeef23983a 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
|
@@ -83,6 +83,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
|
|
- 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().galeConfig().gameplayMechanics.fixes.mc238526) || (pos.getY() >= j && pos.getY() <= i)) && world.getFluidState(pos.below()).is(FluidTags.WATER) && world.getBlockState(pos.above()).is(Blocks.WATER); // Gale - Purpur - fix MC-238526
|
|
}
|
|
}
|
|
diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
index 82946c6784b9b42681e03a815d82931ae150aaba..22321ab19af662c8f75620422c1775fe805356f3 100644
|
|
--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
+++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
@@ -248,7 +248,12 @@ public class GaleWorldConfiguration extends ConfigurationPart {
|
|
public class Fixes extends ConfigurationPart {
|
|
|
|
public boolean sandDuping = true; // Gale - Purpur - make sand duping fix configurable
|
|
-
|
|
+
|
|
+ // Gale start - Purpur - fix MC-238526
|
|
+ @Setting("mc-238526")
|
|
+ public boolean mc238526 = false;
|
|
+ // Gale end - Purpur - fix MC-238526
|
|
+
|
|
}
|
|
|
|
}
|