fix the search robot ai running for too long if no valid blocks are available

This commit is contained in:
Hea3veN 2015-03-21 08:47:22 -03:00
parent e8fd472d2a
commit a1f195e896
2 changed files with 2 additions and 2 deletions

View file

@ -52,7 +52,7 @@ public class PathFindingSearch implements IIterableAlgorithm {
@Override
public void iterate() {
if (pathFinders.size() < 5 && blockIter.hasNext()) {
iterateSearch(PATH_ITERATIONS * 50);
iterateSearch(PATH_ITERATIONS * 10);
}
iteratePathFind(PATH_ITERATIONS);
}

View file

@ -36,7 +36,7 @@ public class AIRobotSearchBlockBase extends AIRobot {
blockScanner = new PathFindingSearch(robot.worldObj, new BlockIndex(
robot), blockIter, pathFound, 96, robot
.getZoneToWork());
blockScannerJob = new IterableAlgorithmRunner(blockScanner, 40000);
blockScannerJob = new IterableAlgorithmRunner(blockScanner);
blockScannerJob.start();
}