Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local craftSlots = {1, 2, 3, 5, 6, 7, 9, 10, 11}
- local nonCraftSlots = {4, 8, 12, 13, 14, 15, 16}
- while true do
- failed = false
- for _, i in ipairs(craftSlots) do
- if turtle.getItemCount(i) < 64 then
- turtle.select(i)
- turtle.suckDown(64-turtle.getItemCount())
- end
- if turtle.getItemCount(i) == 0 then
- failed = true
- end
- end
- for _, i in ipairs(nonCraftSlots) do
- if turtle.getItemCount(i) > 0 then
- turtle.dropDown()
- end
- end
- if not failed then
- turtle.craft()
- for i=1, 16 do
- detail = turtle.getItemDetail(i)
- if detail and detail.name == "minecraft:iron_block" then
- turtle.select(i)
- turtle.drop()
- end
- end
- elseif failed then
- sleep(5)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment