Examples of Rails


Examples of org.bukkit.material.Rails

      PoweredRail rail = new PoweredRail(Material.POWERED_RAIL);
      rail.setDirection(facing, sloping);
      rail.setPowered(true);
      curBlock.setTypeIdAndData(rail.getItemTypeId(), rail.getData(), true);
    } else {
      Rails rail = new Rails(Material.RAILS);
      rail.setDirection(facing, sloping);
      curBlock.setTypeIdAndData(rail.getItemTypeId(), rail.getData(), true);
    }
  }
View Full Code Here

Examples of org.bukkit.material.Rails

   */
  public static void setRails(org.bukkit.block.Block rails, BlockFace direction) {
    Material type = rails.getType();
    if (type == Material.RAILS) {
      int olddata = getRawData(rails);
      Rails r = (Rails) MaterialUtil.getData(type, olddata);
      r.setDirection(FaceUtil.toRailsDirection(direction), r.isOnSlope());
      // If changed, update the data
      if (MaterialUtil.getRawData(r) != olddata) {
        setData(rails, r);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.