Package com.bergerkiller.bukkit.tc.utils

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


    info.cartBlock = member.getBlock();
    BlockFace[] possible = RailType.getType(info.cartBlock).getPossibleDirections(info.cartBlock);
    TrackIterator iter = new TrackIterator(null, null, (int) member.getGroup().length(), true);
    info.distance = Integer.MAX_VALUE;
    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();
      }
View Full Code Here


    TrackIterator iter = new TrackIterator(null, null, 20, false);

    // Check all directions
    for (BlockFace face : toCheck) {
      double trackLength = 0.0;
      iter.reset(railsBlock, face);
      // Skip the start block, abort if no start block was found
      if (iter.hasNext()) {
        iter.next();
      } else {
        continue;
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.