Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- waitTime = 60
- local function harvest()
- for i=1,9 do
- for j=1,9 do
- turtle.forward()
- isBlockDown, blockDown = turtle.inspectDown()
- if isBlockDown and string.find(blockDown.name, "mystical_flower") then
- turtle.digDown()
- turtle.suckDown()
- end
- end
- if i % 2 ~= 0 then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- else
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- end
- end
- local function main()
- os.setComputerLabel("Fuel: "..turtle.getFuelLevel())
- while turtle.getFuelLevel() < 81 do
- turtle.select(1)
- turtle.refuel()
- os.setComputerLabel("Put Fuel in Slot 1")
- end
- harvest()
- sleep(5)
- for i=1,2 do
- for j=1,9 do
- turtle.forward()
- end
- turtle.turnLeft()
- end
- isBlockDown, blockDown = turtle.inspectDown()
- if isBlockDown and blockDown.name == "minecraft:chest" then
- for slot=1,16 do
- turtle.select(slot)
- turtle.dropDown()
- end
- end
- for i=1,waitTime do
- os.setComputerLabel("Waiting "..waitTime-i.." seconds")
- sleep(1)
- end
- end
- while true do
- main()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement