Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local saplingSlot = 1
- local woodBlockSlot = 9
- while true do
- term.clear()
- term.setCursorPos(1,1)
- turtle.select(saplingSlot)
- turtle.place()
- turtle.select(woodBlockSlot)
- while true do
- if turtle.compare() then
- print("Growth detected.")
- break
- end
- end
- turtle.dig()
- os.sleep(0.1)
- print("Moving forward...")
- turtle.forward()
- while turtle.detectUp() do
- turtle.digUp()
- turtle.up()
- end
- print("End of tree, returning to dump items...")
- while not turtle.detectDown() do
- turtle.down()
- end
- turtle.back()
- for itr=1, 12 do
- turtle.select(itr)
- if itr ~= saplingSlot then
- if itr == woodBlockSlot then
- turtle.dropDown(turtle.getItemCount(itr)-1)
- else
- turtle.dropDown()
- end
- end
- end
- print("All done here, returning to top of loop...")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement