diff options
Diffstat (limited to 'nms-patches/BlockButtonAbstract.patch')
-rw-r--r-- | nms-patches/BlockButtonAbstract.patch | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nms-patches/BlockButtonAbstract.patch b/nms-patches/BlockButtonAbstract.patch index 84ea0233..1700b694 100644 --- a/nms-patches/BlockButtonAbstract.patch +++ b/nms-patches/BlockButtonAbstract.patch @@ -12,8 +12,8 @@ public abstract class BlockButtonAbstract extends BlockAttachable { public static final BlockStateBoolean POWERED = BlockProperties.t; -@@ -77,6 +82,19 @@ - if (((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)).booleanValue()) { +@@ -72,6 +77,19 @@ + if ((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)) { return true; } else { + // CraftBukkit start @@ -29,10 +29,10 @@ + return true; + } + // CraftBukkit end - world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, Boolean.valueOf(true)), 3); + world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, true), 3); this.a(entityhuman, world, blockposition, true); this.c(iblockdata, world, blockposition); -@@ -118,6 +136,16 @@ +@@ -113,6 +131,16 @@ if (this.E) { this.b(iblockdata, world, blockposition); } else { @@ -46,12 +46,12 @@ + return; + } + // CraftBukkit end - world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, Boolean.valueOf(false)), 3); + world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, false), 3); this.c(iblockdata, world, blockposition); this.a((EntityHuman) null, world, blockposition, false); -@@ -137,7 +165,44 @@ +@@ -132,7 +160,44 @@ boolean flag = !list.isEmpty(); - boolean flag1 = ((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)).booleanValue(); + boolean flag1 = (Boolean) iblockdata.get(BlockButtonAbstract.POWERED); + // CraftBukkit start - Call interact event when arrows turn on wooden buttons + if (flag1 != flag && flag) { @@ -91,6 +91,6 @@ + return; + } + // CraftBukkit end - world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, Boolean.valueOf(flag)), 3); + world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, flag), 3); this.c(iblockdata, world, blockposition); this.a((EntityHuman) null, world, blockposition, flag); |