mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Allow soil to moisten from water directly underneath
This commit is contained in:
@@ -166,6 +166,11 @@ campfires-go-out-in-rain
|
||||
* **default**: true
|
||||
* **description**: Campfires burn out in the rain
|
||||
|
||||
allow-moist-soil-from-water-below
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
* **default**: true
|
||||
* **description**: Allow soil to moisten from water directly below it
|
||||
|
||||
allow-sign-colors
|
||||
~~~~~~~~~~~~~~~~~
|
||||
* **default**: true
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From dde0a3375684de5d658a8036d3a76ff83fa110ae Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 21 Jun 2019 14:37:10 -0500
|
||||
Subject: [PATCH] Allow soil to moisten from water directly under it
|
||||
|
||||
---
|
||||
.../java/net/minecraft/server/BlockSoil.java | 19 +++++++------------
|
||||
.../net/pl3x/purpur/PurpurWorldConfig.java | 5 +++++
|
||||
2 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockSoil.java b/src/main/java/net/minecraft/server/BlockSoil.java
|
||||
index 30033ed885..57769c98e8 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockSoil.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockSoil.java
|
||||
@@ -112,19 +112,14 @@ public class BlockSoil extends Block {
|
||||
}
|
||||
|
||||
private static boolean a(IWorldReader iworldreader, BlockPosition blockposition) {
|
||||
- Iterator iterator = BlockPosition.a(blockposition.b(-4, 0, -4), blockposition.b(4, 1, 4)).iterator();
|
||||
-
|
||||
- BlockPosition blockposition1;
|
||||
-
|
||||
- do {
|
||||
- if (!iterator.hasNext()) {
|
||||
- return false;
|
||||
+ // Purpur start
|
||||
+ for (BlockPosition position : BlockPosition.a(blockposition.b(-4, 0, -4), blockposition.b(4, 1, 4))) {
|
||||
+ if (iworldreader.getFluid(position).a(TagsFluid.WATER)) {
|
||||
+ return true;
|
||||
}
|
||||
-
|
||||
- blockposition1 = (BlockPosition) iterator.next();
|
||||
- } while (!iworldreader.getFluid(blockposition1).a(TagsFluid.WATER));
|
||||
-
|
||||
- return true;
|
||||
+ }
|
||||
+ return ((WorldServer)iworldreader).purpurConfig.allowMoistSoilFromWaterBelow && iworldreader.getFluid(blockposition.shift(EnumDirection.DOWN)).a(TagsFluid.WATER);
|
||||
+ // Purpur end
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 92eeaca428..9d25674e19 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -97,6 +97,11 @@ public class PurpurWorldConfig {
|
||||
campfiresGoOutInRain = getBoolean("campfires-go-out-in-rain", campfiresGoOutInRain);
|
||||
}
|
||||
|
||||
+ public boolean allowMoistSoilFromWaterBelow = true;
|
||||
+ private void allowMoistSoilFromWaterBelow() {
|
||||
+ allowMoistSoilFromWaterBelow = getBoolean("allow-moist-soil-from-water-below", allowMoistSoilFromWaterBelow);
|
||||
+ }
|
||||
+
|
||||
public boolean allowSignColors = true;
|
||||
private void allowSignColors() {
|
||||
allowSignColors = getBoolean("allow-sign-colors", allowSignColors);
|
||||
--
|
||||
2.20.1
|
||||
|
||||
Reference in New Issue
Block a user