use of buildcraft.robotics.StackRequest in project BuildCraft by BuildCraft.
the class AIRobotSearchStackRequest method getAvailableRequests.
private Collection<StackRequest> getAvailableRequests(DockingStation station) {
List<StackRequest> result = new ArrayList<>();
IRequestProvider provider = station.getRequestProvider();
if (provider == null) {
return result;
}
for (int i = 0; i < provider.getRequestsCount(); i++) {
if (provider.getRequest(i) == null) {
continue;
}
StackRequest req = new StackRequest(provider, i, provider.getRequest(i));
req.setStation(station);
if (!robot.getRegistry().isTaken(req.getResourceId(robot.worldObj))) {
result.add(req);
}
}
return result;
}
Aggregations