koriar

treemon

Dec 19th, 2020 (edited)
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. function tosky()
  2.  height = 0
  3.  while turtle.detectUp() do
  4.   turtle.digUp()
  5.   turtle.up()
  6.   height = height+1
  7.  end
  8.  while height >0 do
  9.   turtle.down()
  10.   height = height-1
  11.  end
  12. end
  13.  
  14. function dumpAll()
  15.  local i=2
  16.  while i<16 do
  17.   turtle.select(i)
  18.   turtle.dropDown()
  19.   i = i + 1
  20.  end
  21. end
  22.  
  23. print("Place facing a sapling, put more saplings in the first slot")
  24.  
  25. while true do
  26.  turtle.up()
  27.  while not turtle.detect() do
  28.   turtle.back()
  29.   sleep(10)
  30.   turtle.forward()
  31.  end
  32.  turtle.down()
  33.  turtle.dig()
  34.  turtle.forward()
  35.  tosky()
  36.  turtle.back()
  37.  turtle.select(1)
  38.  turtle.place()
  39.  dumpAll()
  40. end
Add Comment
Please, Sign In to add comment