summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-01-04 08:57:01 +1100
committermd_5 <git@md-5.net>2018-01-04 08:57:01 +1100
commitdc7d31b00d121c486660fafc9d6b4eb38e9db76d (patch)
tree13c917553e26573cfa122e7b7745cc6852c2b211
parente40c9ef4b981612e94e3ea4b980060cb442d630c (diff)
downloadcraftbukkit-dc7d31b00d121c486660fafc9d6b4eb38e9db76d.tar
craftbukkit-dc7d31b00d121c486660fafc9d6b4eb38e9db76d.tar.gz
craftbukkit-dc7d31b00d121c486660fafc9d6b4eb38e9db76d.tar.lz
craftbukkit-dc7d31b00d121c486660fafc9d6b4eb38e9db76d.tar.xz
craftbukkit-dc7d31b00d121c486660fafc9d6b4eb38e9db76d.zip
SPIGOT-3735: Missing call to BlockFadeEvent
-rw-r--r--nms-patches/BlockSoil.patch24
1 files changed, 10 insertions, 14 deletions
diff --git a/nms-patches/BlockSoil.patch b/nms-patches/BlockSoil.patch
index bb670a36..a7d37719 100644
--- a/nms-patches/BlockSoil.patch
+++ b/nms-patches/BlockSoil.patch
@@ -12,20 +12,7 @@
public class BlockSoil extends Block {
public static final BlockStateInteger MOISTURE = BlockStateInteger.of("moisture", 0, 7);
-@@ -36,6 +41,12 @@
- if (i > 0) {
- world.setTypeAndData(blockposition, iblockdata.set(BlockSoil.MOISTURE, Integer.valueOf(i - 1)), 2);
- } else if (!this.c(world, blockposition)) {
-+ // CraftBukkit start
-+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+ if (CraftEventFactory.callBlockFadeEvent(block, Blocks.DIRT).isCancelled()) {
-+ return;
-+ }
-+ // CraftBukkit end
- b(world, blockposition);
- }
- } else if (i < 7) {
-@@ -45,11 +56,29 @@
+@@ -45,14 +50,38 @@
}
public void fallOn(World world, BlockPosition blockposition, Entity entity, float f) {
@@ -56,3 +43,12 @@
}
protected static void b(World world, BlockPosition blockposition) {
++ // CraftBukkit start
++ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
++ if (CraftEventFactory.callBlockFadeEvent(block, Blocks.DIRT).isCancelled()) {
++ return;
++ }
++ // CraftBukkit end
+ world.setTypeUpdate(blockposition, Blocks.DIRT.getBlockData());
+ AxisAlignedBB axisalignedbb = BlockSoil.c.a(blockposition);
+ List list = world.getEntities((Entity) null, axisalignedbb);