use of buildcraft.robotics.ai.AIRobotGotoSleep in project BuildCraft by BuildCraft.
the class BoardRobotPlanter method delegateAIEnded.
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotSearchAndGotoBlock) {
if (ai.success()) {
blockFound = ((AIRobotSearchAndGotoBlock) ai).getBlockFound();
startDelegateAI(new AIRobotPlant(robot, blockFound));
} else {
startDelegateAI(new AIRobotGotoSleep(robot));
}
} else if (ai instanceof AIRobotPlant) {
releaseBlockFound();
} else if (ai instanceof AIRobotFetchAndEquipItemStack) {
if (!ai.success()) {
startDelegateAI(new AIRobotGotoSleep(robot));
}
}
}
use of buildcraft.robotics.ai.AIRobotGotoSleep in project BuildCraft by BuildCraft.
the class BoardRobotDelivery method delegateAIEnded.
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotSearchStackRequest) {
if (!ai.success()) {
deliveryBlacklist.clear();
startDelegateAI(new AIRobotGotoSleep(robot));
} else {
currentRequest = ((AIRobotSearchStackRequest) ai).request;
if (!currentRequest.getStation(robot.worldObj).take(robot)) {
releaseCurrentRequest();
}
}
} else if (ai instanceof AIRobotGotoStationAndLoad) {
if (!ai.success()) {
deliveryBlacklist.add(currentRequest.getStack());
releaseCurrentRequest();
} else {
startDelegateAI(new AIRobotDeliverRequested(robot, currentRequest));
}
} else if (ai instanceof AIRobotDeliverRequested) {
releaseCurrentRequest();
}
}
use of buildcraft.robotics.ai.AIRobotGotoSleep in project BuildCraft by BuildCraft.
the class BoardRobotFarmer method delegateAIEnded.
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotSearchAndGotoBlock) {
if (ai.success()) {
blockFound = ((AIRobotSearchAndGotoBlock) ai).getBlockFound();
startDelegateAI(new AIRobotUseToolOnBlock(robot, blockFound));
} else {
startDelegateAI(new AIRobotGotoSleep(robot));
}
} else if (ai instanceof AIRobotFetchAndEquipItemStack) {
if (!ai.success()) {
startDelegateAI(new AIRobotGotoSleep(robot));
}
} else if (ai instanceof AIRobotUseToolOnBlock) {
releaseBlockFound();
}
}
use of buildcraft.robotics.ai.AIRobotGotoSleep in project BuildCraft by BuildCraft.
the class BoardRobotPump method delegateAIEnded.
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotSearchAndGotoBlock) {
if (ai.success()) {
blockFound = ((AIRobotSearchAndGotoBlock) ai).getBlockFound();
startDelegateAI(new AIRobotPumpBlock(robot, blockFound));
} else {
startDelegateAI(new AIRobotGotoSleep(robot));
}
} else if (ai instanceof AIRobotPumpBlock) {
releaseBlockFound();
} else if (ai instanceof AIRobotGotoStationAndUnloadFluids) {
if (!ai.success()) {
startDelegateAI(new AIRobotGotoSleep(robot));
}
}
}
use of buildcraft.robotics.ai.AIRobotGotoSleep in project BuildCraft by BuildCraft.
the class BoardRobotStripes method delegateAIEnded.
@Override
public void delegateAIEnded(AIRobot ai) {
if (ai instanceof AIRobotSearchAndGotoBlock) {
if (ai.success()) {
blockFound = ((AIRobotSearchAndGotoBlock) ai).getBlockFound();
startDelegateAI(new AIRobotStripesHandler(robot, blockFound));
} else {
startDelegateAI(new AIRobotGotoSleep(robot));
}
} else if (ai instanceof AIRobotFetchAndEquipItemStack) {
if (!ai.success()) {
startDelegateAI(new AIRobotGotoSleep(robot));
}
} else if (ai instanceof AIRobotStripesHandler) {
releaseBlockFound();
}
}
Aggregations