Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local slot = 1
- local function refuel()
- local fuelLevel = turtle.getFuelLevel()
- if fuelLevel == "unlimited" or fuelLevel > 0 then
- return
- end
- local function tryRefuel()
- for n=1,16 do
- if turtle.getItemCount(n) > 0 then
- turtle.select(n)
- if turtle.refuel(1) then
- turtle.select(1)
- return true
- end
- end
- end
- turtle.select(1)
- return false
- end
- if not tryRefuel() then
- print( "Add more fuel to continue." )
- while not tryRefuel() do
- sleep(1)
- end
- print( "Resuming branch mine..." )
- end
- end
- while true do
- turtle.select(slot)
- refuel()
- turtle.digDown()
- turtle.placeDown()
- turtle.forward()
- end
Advertisement
Add Comment
Please, Sign In to add comment