if (robot.getRegistry().take(new ResourceIdBlock(indexStored), robot)) {
startDelegateAI(new AIRobotGotoBlock(robot, ((AIRobotSearchBlock) ai).path));
}
}
} else if (ai instanceof AIRobotGotoBlock) {
startDelegateAI(new AIRobotBreak(robot, indexStored));
} else if (ai instanceof AIRobotBreak) {
robot.getRegistry().release(new ResourceIdBlock(indexStored));
indexStored = null;
}
}