Java Code Examples for org.bukkit.Material#REDSTONE_COMPARATOR_OFF

The following examples show how to use org.bukkit.Material#REDSTONE_COMPARATOR_OFF . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WrappedBlock8.java    From Hawk with GNU General Public License v3.0 5 votes vote down vote up
private boolean isReallySolid(Block b) {
    boolean reallySolid = block.getMaterial().isSolid();
    MaterialData matData = b.getState().getData();
    if (matData instanceof Sign || matData instanceof Banner)
        reallySolid = false;
    else if (matData instanceof FlowerPot || matData instanceof Diode || matData instanceof Skull ||
            b.getType() == Material.CARPET || matData instanceof Ladder ||
            b.getType() == Material.REDSTONE_COMPARATOR || b.getType() == Material.REDSTONE_COMPARATOR_ON ||
            b.getType() == Material.REDSTONE_COMPARATOR_OFF || b.getType() == Material.SOIL ||
            b.getType() == Material.WATER_LILY || b.getType() == Material.SNOW || b.getType() == Material.COCOA) {
        reallySolid = true;
    }
    return reallySolid;
}
 
Example 2
Source File: Comparator.java    From Kettle with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Constructs a comparator switched on or off, with the specified mode and facing the specified direction.
 *
 * @param facingDirection the direction the comparator is facing
 * @param isSubtraction   True if the comparator is in subtraction mode, false for normal comparator operation
 * @param state           True if the comparator is in the on state
 * @see BlockFace
 */
public Comparator(BlockFace facingDirection, boolean isSubtraction, boolean state) {
    super(state ? Material.REDSTONE_COMPARATOR_ON : Material.REDSTONE_COMPARATOR_OFF);
    setFacingDirection(facingDirection);
    setSubtractionMode(isSubtraction);
}