Search in sources :

Example 1 with AIRobotUseToolOnBlock

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

Aggregations

AIRobotFetchAndEquipItemStack (buildcraft.robotics.ai.AIRobotFetchAndEquipItemStack)1 AIRobotGotoSleep (buildcraft.robotics.ai.AIRobotGotoSleep)1 AIRobotSearchAndGotoBlock (buildcraft.robotics.ai.AIRobotSearchAndGotoBlock)1 AIRobotUseToolOnBlock (buildcraft.robotics.ai.AIRobotUseToolOnBlock)1