diff --git a/nms-patches/BlockPiston.patch b/nms-patches/BlockPiston.patch index 1e7d0100c6..7ea8358fe0 100644 --- a/nms-patches/BlockPiston.patch +++ b/nms-patches/BlockPiston.patch @@ -1,5 +1,5 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/BlockPiston.java 2015-02-26 22:40:22.195608144 +0000 -+++ src/main/java/net/minecraft/server/BlockPiston.java 2015-02-26 22:40:22.199608144 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/BlockPiston.java 2015-03-09 22:33:56.816544171 +0000 ++++ src/main/java/net/minecraft/server/BlockPiston.java 2015-03-09 22:33:56.816544171 +0000 @@ -2,6 +2,18 @@ import java.util.List; @@ -46,15 +46,15 @@ this.a(world, blockposition, enumdirection, false); } } else { -@@ -286,10 +309,46 @@ +@@ -286,10 +309,53 @@ if (!pistonextendschecker.a()) { return false; } else { + // CraftBukkit start + final org.bukkit.block.Block bblock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); + -+ final List moved = pistonextendschecker.getMovedBlocks(); -+ final List broken = pistonextendschecker.getBrokenBlocks(); ++ final List moved = pistonextendschecker.getMovedBlocks(); ++ final List broken = pistonextendschecker.getBrokenBlocks(); + + List blocks = new AbstractList() { + @@ -86,6 +86,13 @@ + world.getServer().getPluginManager().callEvent(event); + + if (event.isCancelled()) { ++ for (BlockPosition b : broken) { ++ world.notify(b); ++ } ++ for (BlockPosition b : moved) { ++ world.notify(b); ++ world.notify(b.shift(enumdirection1)); ++ } + return false; + } + // CraftBukkit end