Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local length = tonumber(arg[1])
- local function CheckInventorySpace()
- while true do
- for i=1,16 do
- if turtle.getItemCount(i) == 0 then
- return
- end
- end
- input("Inventory full, please clear inventory then press enter to continue...")
- end
- end
- turtle.digDown()
- turtle.digUp()
- for i=1,length do
- local sucked = false
- repeat
- CheckInventorySpace()
- local dug = turtle.dig()
- CheckInventorySpace()
- sucked = turtle.suckUp()
- if sucked and not dug then
- sleep(0.1)
- end
- until (not sucked) and turtle.forward()
- CheckInventorySpace()
- turtle.digUp()
- CheckInventorySpace()
- local success, info = turtle.inspectDown()
- if success and (info.name == "minecraft:sand" or info.name == "minecraft:gravel") then
- CheckInventorySpace()
- turtle.digDown()
- end
- end
Add Comment
Please, Sign In to add comment