mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 02:17:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 0514fc4e2 Add missing effects 8f5d9effd Add getMainThreadExecutor to BukkitScheduler 313b5020b Allow adding items to BlockDropItemEvent (#5093) 9a556d9da [CI-SKIP] [Auto] Rebuild Patches 72b2768ad Inline shift fields in EnumDirection (#5082) ffff53fa7 added option to disable pathfinding updates on block changes (#5123) b67081fd7 add DragonEggFormEvent (fixes #5110) (#5112) 3eefafbaf Fix javadoc build 0081ed1c4 Add javadoc step to GH Actions 01082503e Add dropLeash variable to EntityUnleashEvent (#5130) 31f9f869a [CI-SKIP] Fix YourKit links in readme, fixes #5091 8ac27aa38 [Auto] Updated Upstream (CraftBukkit) c4d9cc831 [Auto] Updated Upstream (Bukkit/CraftBukkit) d0477d326 [Auto] Updated Upstream (CraftBukkit) d9f5f7018 EntityMoveEvent (#4614)
54 lines
2.3 KiB
Diff
54 lines
2.3 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 a315e2628c35ee713b68741c6e52c4b140c05f27..8dd48669c29dd51ed4d535dad0b0319f4bb2250c 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 e73b493c67b53273330dbf7abbda2ace54a169f4..3cc9fcfe0945e7c56c9e74ef273baf3dfc4b53f6 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() {
|