Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- materials = 0
- function checkFuel()
- if turtle.getFuelLevel() == 0 then
- selected = turtle.getSelectedSlot()
- turtle.select(16)
- turtle.refuel()
- turtle.select(selected)
- end
- end
- function countMaterials()
- for slot = 1,15 do
- turtle.select(slot)
- item = turtle.getItemDetail()
- if item ~= nil then
- materials = materials + item.count
- end
- end
- end
- countMaterials()
- slot = 1
- turtle.select(slot)
- for i = 1,materials do
- checkFuel()
- if turtle.getItemCount() == 0 then
- slot = slot + 1
- turtle.select(slot)
- end
- turtle.placeDown()
- turtle.forward()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement