fix en error in the planter when path length == 1
This commit is contained in:
parent
a1f195e896
commit
e9e7d4b6c6
1 changed files with 3 additions and 1 deletions
|
@ -127,7 +127,9 @@ public class BoardRobotPlanter extends RedstoneBoardRobot {
|
|||
AIRobotSearchRandomBlock searchAI = (AIRobotSearchRandomBlock) ai;
|
||||
if (searchAI.takeResource()) {
|
||||
blockFound = searchAI.blockFound;
|
||||
if (searchAI.path.size() > 1){
|
||||
searchAI.path.removeLast();
|
||||
}
|
||||
startDelegateAI(new AIRobotGotoBlock(robot, searchAI.path));
|
||||
} else {
|
||||
startDelegateAI(new AIRobotGotoSleep(robot));
|
||||
|
|
Loading…
Reference in a new issue