mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 9a129fa99 Add #getEligibleHumans to SkeletonHorseTrapEvent b5e23c7a6 Fix merging spawning values a932e8ad7 Turn off spigot verbose world by default 8ced89f65 Fix Delegation to vanilla chunk gen
54 lines
2.2 KiB
Diff
54 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 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
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockSoil.java b/src/main/java/net/minecraft/server/BlockSoil.java
|
|
index a315e2628c..8dd48669c2 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockSoil.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockSoil.java
|
|
@@ -116,19 +116,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((Tag) TagsFluid.WATER));
|
|
-
|
|
- return true;
|
|
+ }
|
|
+ return ((WorldServer) iworldreader).purpurConfig.farmlandGetsMoistFromBelow && 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 bc5cba3074..3721bd745e 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -109,6 +109,11 @@ public class PurpurWorldConfig {
|
|
});
|
|
}
|
|
|
|
+ public boolean farmlandGetsMoistFromBelow = false;
|
|
+ private void farmlandSettings() {
|
|
+ farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow);
|
|
+ }
|
|
+
|
|
public boolean signAllowColors = false;
|
|
public boolean signRightClickEdit = false;
|
|
private void signSettings() {
|