summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-07-20 10:59:23 +1000
committermd_5 <git@md-5.net>2018-07-20 10:59:23 +1000
commitfa6e97a8f8c57e0a5bbd046fe9af3d795a2c11b5 (patch)
tree674eaabac6bb37184cd48d239318b525ac9ac31c /nms-patches
parent66b62a63b5d1e594b95bc365f61bdcae43b80c0d (diff)
downloadcraftbukkit-fa6e97a8f8c57e0a5bbd046fe9af3d795a2c11b5.tar
craftbukkit-fa6e97a8f8c57e0a5bbd046fe9af3d795a2c11b5.tar.gz
craftbukkit-fa6e97a8f8c57e0a5bbd046fe9af3d795a2c11b5.tar.lz
craftbukkit-fa6e97a8f8c57e0a5bbd046fe9af3d795a2c11b5.tar.xz
craftbukkit-fa6e97a8f8c57e0a5bbd046fe9af3d795a2c11b5.zip
SPIGOT-4064: Fix BlockPistonRetractEvent for regular pistons
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/BlockPiston.patch30
1 files changed, 15 insertions, 15 deletions
diff --git a/nms-patches/BlockPiston.patch b/nms-patches/BlockPiston.patch
index ae8fcc83..7b08e4bd 100644
--- a/nms-patches/BlockPiston.patch
+++ b/nms-patches/BlockPiston.patch
@@ -19,25 +19,25 @@
public class BlockPiston extends BlockDirectional {
public static final BlockStateBoolean EXTENDED = BlockProperties.f;
-@@ -109,6 +121,18 @@
- b0 = 2;
- }
+@@ -111,6 +123,18 @@
}
-+ // CraftBukkit start
-+ if (!this.sticky) {
-+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+ BlockPistonRetractEvent event = new BlockPistonRetractEvent(block, ImmutableList.<org.bukkit.block.Block>of(), CraftBlock.notchToBlockFace(enumdirection));
-+ world.getServer().getPluginManager().callEvent(event);
-+
-+ if (event.isCancelled()) {
-+ return;
-+ }
-+ }
-+ // PAIL: checkME - what happened to setTypeAndData?
-+ // CraftBukkit end
}
++ // CraftBukkit start
++ if (!this.sticky) {
++ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
++ BlockPistonRetractEvent event = new BlockPistonRetractEvent(block, ImmutableList.<org.bukkit.block.Block>of(), CraftBlock.notchToBlockFace(enumdirection));
++ world.getServer().getPluginManager().callEvent(event);
++
++ if (event.isCancelled()) {
++ return;
++ }
++ }
++ // PAIL: checkME - what happened to setTypeAndData?
++ // CraftBukkit end
world.playBlockAction(blockposition, this, b0, enumdirection.a());
+ }
+
@@ -271,6 +295,48 @@
IBlockData[] aiblockdata = new IBlockData[j];
EnumDirection enumdirection1 = flag ? enumdirection : enumdirection.opposite();