Add Materials.isPistonBlock().

This commit is contained in:
sk89q 2014-08-18 23:30:36 -07:00
parent f6f94571ea
commit 711fe7ad2f

View File

@ -531,6 +531,18 @@ public static boolean isRailBlock(Material material) {
|| material == Material.POWERED_RAIL;
}
/**
* Test whether the given material is a piston block, not including
* the "technical blocks" such as the piston extension block.
*
* @param material the material
* @return true if a piston block
*/
public static boolean isPistonBlock(Material material) {
return material == Material.PISTON_BASE
|| material == Material.PISTON_STICKY_BASE;
}
/**
* Test whether the given material is a Minecart.
*