Skip to content

Commit

Permalink
Added BlockType.redstone SOMETHING.
Browse files Browse the repository at this point in the history
  • Loading branch information
sk89q committed Feb 27, 2011
1 parent 4488bb8 commit b7cfdf2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/com/sk89q/worldedit/blocks/BlockType.java
Expand Up @@ -433,6 +433,24 @@ public static boolean isContainerBlock(int id) {
|| 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
Expand Down

0 comments on commit b7cfdf2

Please sign in to comment.