diff --git a/nms-patches/BlockPiston.patch b/nms-patches/BlockPiston.patch index 70fac0b837..fb9b9e0944 100644 --- a/nms-patches/BlockPiston.patch +++ b/nms-patches/BlockPiston.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/BlockPiston.java 2014-11-28 17:43:42.933707439 +0000 -+++ src/main/java/net/minecraft/server/BlockPiston.java 2014-11-28 17:38:20.000000000 +0000 +--- ../work/decompile-8eb82bde//net/minecraft/server/BlockPiston.java 2014-12-05 15:10:57.106252715 +0000 ++++ src/main/java/net/minecraft/server/BlockPiston.java 2014-12-05 15:10:54.834252765 +0000 @@ -1,6 +1,16 @@ package net.minecraft.server; @@ -38,7 +38,7 @@ world.setTypeAndData(blockposition, iblockdata.set(BlockPiston.EXTENDED, Boolean.valueOf(false)), 2); world.playBlockAction(blockposition, this, 1, enumdirection.a()); } -@@ -286,6 +305,35 @@ +@@ -286,10 +305,40 @@ if (!pistonextendschecker.a()) { return false; } else { @@ -64,13 +64,18 @@ + } + }; + -+ BlockPistonExtendEvent event = new BlockPistonExtendEvent(bblock, blocks, CraftBlock.notchToBlockFace(enumdirection)); + int i = list.size() + list1.size(); + Block[] ablock = new Block[i]; + EnumDirection enumdirection1 = flag ? enumdirection : enumdirection.opposite(); + ++ BlockPistonExtendEvent event = new BlockPistonExtendEvent(bblock, blocks, CraftBlock.notchToBlockFace(enumdirection1)); + world.getServer().getPluginManager().callEvent(event); + + if (event.isCancelled()) { + return false; + } + // CraftBukkit end - int i = list.size() + list1.size(); - Block[] ablock = new Block[i]; - EnumDirection enumdirection1 = flag ? enumdirection : enumdirection.opposite(); ++ + int j; + BlockPosition blockposition1; +