Examples of currentDirection()


Examples of com.bergerkiller.bukkit.tc.utils.TrackIterator.currentDirection()

          // Check that the direction alternates
          if (lastFace == null) {
            // Start block: store it's information
            lastFace = iter.currentDirection();
          } else {
            BlockFace newFace = iter.currentDirection();
            int newAngle = MathUtil.wrapAngle(FaceUtil.faceToYaw(newFace) - FaceUtil.faceToYaw(lastFace));
            if (Math.abs(newAngle) != 90) {
              // Not a 90-degree angle!
              break;
            }
View Full Code Here

Examples of com.bergerkiller.bukkit.tc.utils.TrackIterator.currentDirection()

      } else {
        // Straight mode
        while (iter.hasNext()) {
          iter.next();
          // Check that the direction stays the same
          if (iter.currentDirection() != face) {
            break;
          }
          trackLength++;
        }
      }
View Full Code Here

Examples of com.bergerkiller.bukkit.tc.utils.TrackIterator.currentDirection()

    for (BlockFace dir : possible) {
      iter.reset(info.cartBlock, dir);
      if (iter.tryFind(this.info.getRails()) && iter.getCartDistance() < info.distance) {
        info.distance = iter.getCartDistance();
        info.cartDir = dir;
        info.centerDir = iter.currentDirection();
      }
    }
    // Adjust the distance based on member-block position
    if (info.cartDir != null) {
      // Adjust for the small offset of the cart from the original block
View Full Code Here

Examples of com.bergerkiller.bukkit.tc.utils.TrackIterator.currentDirection()

        while (iter.hasNext()) {
          iter.next();
          // Check that the direction alternates
          if (lastFace == null) {
            // Start block: store it's information
            lastFace = iter.currentDirection();
          } else {
            BlockFace newFace = iter.currentDirection();
            int newAngle = MathUtil.wrapAngle(FaceUtil.faceToYaw(newFace) - FaceUtil.faceToYaw(lastFace));
            if (Math.abs(newAngle) != 90) {
              // Not a 90-degree angle!
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.