function craftingManager()
local craftables = ae.getCraftables()
local networkItems = ae.getItemsInNetwork()
if craftables == nil then return end
for label,number in pairs(toCraft) do
for i,j in pairs(craftables) do
if not(i == "n") then
if (j.getItemStack().label == label) then
if checkCrafting(label) and number-networkItems[label].getItemStack().size > 0 then
crafting[label] = j.request(number-j.getItemStack().size)
if crafting[label] == nil or crafting[label].isCanceled() == true then
printTerm("fail "..number-j.getItemStack().size .. " x " .. label)
crafting[label] = nil
else
printTerm("success "..number-j.getItemStack().size .. " x " .. label)
addCraftingToList(label,number-j.getItemStack().size)
end
end
break;
end
end
end
end
end