Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function refuel()
- turtle.select(15)
- turtle.placeUp()
- turtle.suckUp()
- turtle.refuel()
- turtle.digUp()
- turtle.select(1)
- end
- local function drop()
- turtle.select(16)
- turtle.placeUp()
- for i = 1, 14 do
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(16)
- turtle.digUp()
- turtle.select(1)
- end
- local function checkAndDrop()
- local needDrop = true
- for i = 1, 14 do
- if turtle.getItemCount(i) == 0 then
- needDrop = false
- end
- end
- if needDrop then
- drop()
- end
- end
- if turtle.getItemCount(15) == 1 or turtle.getItemCount(16) == 1 and not (turtle.getItemCount(15) == 1 and turtle.getItemCount(16) == 1) then
- --exactly one of our ender chests was in use.
- if turtle.getItemCount(15) == 1 then
- drop()
- else
- refuel()
- end
- end
- while true do
- if turtle.getFuelLevel() == 0 then
- refuel()
- end
- turtle.dig()
- checkAndDrop()
- turtle.forward()
- turtle.digUp()
- checkAndDrop()
- turtle.digDown()
- checkAndDrop()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement