diff options
Diffstat (limited to 'nms-patches/BlockCommand.patch')
-rw-r--r-- | nms-patches/BlockCommand.patch | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/nms-patches/BlockCommand.patch b/nms-patches/BlockCommand.patch index 236e740f..94c248a6 100644 --- a/nms-patches/BlockCommand.patch +++ b/nms-patches/BlockCommand.patch @@ -6,15 +6,16 @@ +import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit + - public class BlockCommand extends BlockContainer { + public class BlockCommand extends BlockTileEntity { - public static final BlockStateBoolean TRIGGERED = BlockStateBoolean.of("triggered"); -@@ -20,10 +22,19 @@ - boolean flag = world.isBlockIndirectlyPowered(blockposition); - boolean flag1 = ((Boolean) iblockdata.get(BlockCommand.TRIGGERED)).booleanValue(); + public static final BlockStateDirection a = BlockDirectional.FACING; +@@ -29,7 +31,17 @@ + boolean flag1 = tileentitycommand.d(); + boolean flag2 = tileentitycommand.e(); -- if (flag && !flag1) { +- if (flag && !flag1) { + // CraftBukkit start ++ // PAIL: This section - renames, ordering + org.bukkit.block.Block bukkitBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); + int old = flag1 ? 15 : 0; + int current = flag ? 15 : 0; @@ -24,10 +25,15 @@ + // CraftBukkit end + + if (eventRedstone.getNewCurrent() > 0 && !(eventRedstone.getOldCurrent() > 0)) { // CraftBukkit - world.setTypeAndData(blockposition, iblockdata.set(BlockCommand.TRIGGERED, Boolean.valueOf(true)), 4); - world.a(blockposition, (Block) this, this.a(world)); -- } else if (!flag && flag1) { + tileentitycommand.a(true); + if (tileentitycommand.i() != TileEntityCommand.Type.SEQUENCE && !flag2) { + boolean flag3 = !tileentitycommand.j() || this.e(world, blockposition, iblockdata); +@@ -40,7 +52,7 @@ + this.c(world, blockposition); + } + } +- } else if (!flag && flag1) { + } else if (!(eventRedstone.getNewCurrent() > 0) && eventRedstone.getOldCurrent() > 0) { // CraftBukkit - world.setTypeAndData(blockposition, iblockdata.set(BlockCommand.TRIGGERED, Boolean.valueOf(false)), 4); - } - } + tileentitycommand.a(false); + } + |