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