Search in sources :

Example 1 with AIRobotPumpBlock

use of buildcraft.robotics.ai.AIRobotPumpBlock 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));
        }
    }
}
Also used : AIRobotSearchAndGotoBlock(buildcraft.robotics.ai.AIRobotSearchAndGotoBlock) AIRobotGotoSleep(buildcraft.robotics.ai.AIRobotGotoSleep) AIRobotGotoStationAndUnloadFluids(buildcraft.robotics.ai.AIRobotGotoStationAndUnloadFluids) AIRobotPumpBlock(buildcraft.robotics.ai.AIRobotPumpBlock)

Aggregations

AIRobotGotoSleep (buildcraft.robotics.ai.AIRobotGotoSleep)1 AIRobotGotoStationAndUnloadFluids (buildcraft.robotics.ai.AIRobotGotoStationAndUnloadFluids)1 AIRobotPumpBlock (buildcraft.robotics.ai.AIRobotPumpBlock)1 AIRobotSearchAndGotoBlock (buildcraft.robotics.ai.AIRobotSearchAndGotoBlock)1