Advertisement
jille_Jr

Lumberjack auto

Nov 5th, 2018
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. function hugg()
  2.     turtle.dig()
  3.     turtle.forward()
  4.    
  5.     while turtle.detectUp() do
  6.         turtle.digUp()
  7.         turtle.up()
  8.     end
  9.    
  10.     while not turtle.detectDown() do
  11.         turtle.down()
  12.     end
  13.    
  14.     turtle.back()
  15. end
  16.  
  17. function bonemeal()
  18.    rs.setOutput("left", true)
  19.    sleep(0.5)
  20.    rs.setOutput("left", false)
  21.    sleep(0.5)
  22. end
  23.  
  24. function hanterablocket()
  25.     if turtle.compare() then
  26.         bonemeal()
  27.     else
  28.         hugg()
  29.     end
  30. end
  31.  
  32. function planthugg()
  33.     if turtle.detect() then
  34.         hanterablocket()
  35.     else
  36.         turtle.place()
  37.     end
  38. end
  39.  
  40. while true do
  41.     planthugg()
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement