Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function refuel()
- if turtle.getFuelLevel() < 10 then
- turtle.select(1)
- turtle.refuel(1)
- end
- end
- function deployEnderChest(f)
- turtle.select(2)
- turtle.placeUp()
- local p = peripheral.wrap("top")
- p.setFrequency(f)
- end
- function collectEnderChest()
- turtle.select(2)
- if turtle.getItemCount(2) > 0 then
- turtle.dropDown()
- end
- turtle.digUp()
- end
- function empty()
- deployEnderChest(2730)
- for i=4,16 do
- turtle.select(i)
- turtle.dropUp()
- end
- collectEnderChest()
- turtle.select(3)
- end
- function restockAndesite()
- local count = turtle.getItemCount(3)
- if count < 10 then
- deployEnderChest(273)
- turtle.select(3)
- turtle.suckUp(64 - count)
- collectEnderChest()
- end
- end
- function turnAround()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- s, data = turtle.inspect()
- while data.name ~= "minecraft:obsidian" do
- while turtle.detect() do
- turtle.dig()
- sleep(1)
- end
- refuel()
- restockAndesite()
- turtle.digDown()
- turtle.select(3)
- turtle.placeDown()
- turtle.forward()
- if turtle.getItemCount(16) > 0 then
- empty()
- end
- s, data = turtle.inspect()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement