Examples of PathFinding


Examples of buildcraft.core.utils.PathFinding

      if (aiFind.blockFound == null) {
        terminate();
      }

      blockFound = aiFind.blockFound;
      pathFinding = new PathFinding(robot.worldObj, new BlockIndex(robot), blockFound);
      pathFindingJob = new PathFindingJob(pathFinding);
      pathFindingJob.start();
    } else if (ai instanceof AIRobotGotoBlock) {
      terminate();
    }
View Full Code Here

Examples of buildcraft.core.utils.PathFinding

  }

  @Override
  public void update() {
    if (path == null && pathSearch == null) {
      pathSearch = new PathFinding(robot.worldObj, new BlockIndex((int) Math.floor(robot.posX),
          (int) Math.floor(robot.posY), (int) Math.floor(robot.posZ)), new BlockIndex(
          (int) Math.floor(finalX), (int) Math.floor(finalY), (int) Math.floor(finalZ)), maxDistance);

      pathSearchJob = new PathFindingJob(pathSearch, 100);
      pathSearchJob.start();
View Full Code Here

Examples of buildcraft.core.utils.PathFinding

    stopBefore = 0;
  }

  @Override
  public void start() {
    blockScanner = new PathFinding(robot.worldObj, new BlockIndex(robot), pathFound, 64, robot.getZoneToWork());
    blockScannerJob = new PathFindingJob(blockScanner);
    blockScannerJob.start();
  }
View Full Code Here

Examples of buildcraft.core.utils.PathFinding

      initialized = true;

      if (firstEntity == null) {
        firstEntity = this;
      } else {
        PathFinding p = new PathFinding(worldObj, new BlockIndex(xCoord, yCoord, zCoord), new BlockIndex(
            firstEntity.xCoord, firstEntity.yCoord, firstEntity.zCoord));

        p.iterate(10000);

        LinkedList<BlockIndex> r = p.getResult();

        for (BlockIndex b : r) {
          worldObj.setBlock(b.x, b.y, b.z, Blocks.sponge);
        }
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.