Package org.bukkit.material

Examples of org.bukkit.material.Directional


                return;
            case BlockID.REDSTONE_REPEATER_OFF:
            case BlockID.REDSTONE_REPEATER_ON:
            case BlockID.COMPARATOR_OFF:
            case BlockID.COMPARATOR_ON:
                Directional diode = (Directional) block.getState().getData();
                BlockFace f = diode.getFacing();
                handleDirectWireInput(new WorldVector(w, x + f.getModX(), y, z + f.getModZ()), block, oldLevel, newLevel);
                if(block.getRelative(f).getTypeId() != 0) {
                    handleDirectWireInput(new WorldVector(w, x + f.getModX(), y - 1, z + f.getModZ()), block, oldLevel, newLevel);
                    handleDirectWireInput(new WorldVector(w, x + f.getModX(), y + 1, z + f.getModZ()), block, oldLevel, newLevel);
                    handleDirectWireInput(new WorldVector(w, x + f.getModX() + 1, y - 1, z + f.getModZ()), block, oldLevel, newLevel);
View Full Code Here


   *
   * @param directional block
   * @return facing direction
   */
  public static BlockFace getFacing(org.bukkit.block.Block directional) {
    Directional data = getData(directional, Directional.class);
    return data == null ? BlockFace.NORTH : data.getFacing();
  }
View Full Code Here

TOP

Related Classes of org.bukkit.material.Directional

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.