if (blockFound != null) {
robot.getRegistry().release(new ResourceIdBlock(blockFound));
}
blockFound = searchAI.blockFound;
startDelegateAI(new AIRobotGotoBlock(robot, searchAI.path));
} else {
startDelegateAI(new AIRobotGotoSleep(robot));
}
} else if (ai instanceof AIRobotGotoBlock) {
AIRobotGotoBlock gotoBlock = (AIRobotGotoBlock) ai;
startDelegateAI(new AIRobotUseToolOnBlock(robot, blockFound));
} else if (ai instanceof AIRobotFetchAndEquipItemStack) {
if (robot.getHeldItem() == null) {
startDelegateAI(new AIRobotGotoSleep(robot));