mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 02:47:43 +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)
41 lines
1.9 KiB
Diff
41 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Yive <admin@yive.me>
|
|
Date: Sat, 14 Nov 2020 08:06:20 -0800
|
|
Subject: [PATCH] Ability to re-add farmland mechanics from Alpha
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockSoil.java b/src/main/java/net/minecraft/server/BlockSoil.java
|
|
index 8dd48669c29dd51ed4d535dad0b0319f4bb2250c..099e0d3df219408ebe2a741a02e53eb9f7def28e 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockSoil.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockSoil.java
|
|
@@ -90,6 +90,14 @@ public class BlockSoil extends Block {
|
|
return;
|
|
}
|
|
|
|
+ // Purpur start
|
|
+ if (world.purpurConfig.farmlandAlpha) {
|
|
+ Block block = world.getType(blockposition.down()).getBlock();
|
|
+ if (block instanceof BlockFence || block instanceof BlockCobbleWall) {
|
|
+ return;
|
|
+ }
|
|
+ }
|
|
+ // Purpur end
|
|
if (CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.DIRT.getBlockData()).isCancelled()) {
|
|
return;
|
|
}
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index ac6db65af48222bb3d5c2234e42eb57ef2c1588d..1db3c53b64a8cdd487e8672befa72fdda8eb30e5 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -347,8 +347,10 @@ public class PurpurWorldConfig {
|
|
}
|
|
|
|
public boolean farmlandGetsMoistFromBelow = false;
|
|
+ public boolean farmlandAlpha = false;
|
|
private void farmlandSettings() {
|
|
farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow);
|
|
+ farmlandAlpha = getBoolean("blocks.farmland.use-alpha-farmland", farmlandAlpha);
|
|
}
|
|
|
|
public boolean furnaceInfiniteFuel = false;
|