Examples of tryFind()


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

    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
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.