From b7cfdf2ef4528af4270604a459d5de5791a45e5c Mon Sep 17 00:00:00 2001 From: sk89q Date: Sat, 26 Feb 2011 23:18:28 -0800 Subject: [PATCH] Added BlockType.redstone SOMETHING. --- src/com/sk89q/worldedit/blocks/BlockType.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/com/sk89q/worldedit/blocks/BlockType.java b/src/com/sk89q/worldedit/blocks/BlockType.java index ee0ba93ef..b039b3866 100644 --- a/src/com/sk89q/worldedit/blocks/BlockType.java +++ b/src/com/sk89q/worldedit/blocks/BlockType.java @@ -433,6 +433,24 @@ public enum BlockType { || id == 54; // Chest } + /** + * Returns true if a block uses redstone in some way. + * + * @param id + * @return + */ + public static boolean isRedstoneBlock(int id) { + return id == 69 // Lever + || id == 70 // Stone pressure plate + || id == 72 // Wood pressure plate + || id == 76 // Redstone torch + || id == 75 // Redstone torch + || id == 77 // Stone button + || id == 55 // Redstone wire + || id == 64 // Wooden door + || id == 71; // Iron door + } + /** * Get the block or item that would have been dropped. If nothing is * dropped, 0 will be returned. If the block should not be destroyed