rungholt

microoak

Feb 27th, 2021 (edited)
417
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function InOutChest()
  2.     turtle.turnRight()
  3.     turtle.turnRight()
  4.     turtle.select(1)
  5.     turtle.drop()
  6.     turtle.select(2)
  7.     turtle.drop()
  8.     turtle.select(3)
  9.     turtle.drop()
  10.     turtle.select(4)
  11.     turtle.drop()
  12.     turtle.select(1)
  13.     turtle.suck(1)
  14.     turtle.turnRight()
  15.     turtle.turnRight()
  16. end
  17.  
  18. local function goDown()
  19.     while turtle.detectDown() == false do
  20.         turtle.down()
  21.     end
  22.     turtle.up()
  23. end
  24.  
  25. local function harvest()
  26.     for i = 1, 5 do
  27.         turtle.dig()
  28.         turtle.digUp()
  29.         turtle.up()
  30.     end
  31. end
  32.  
  33. local function plant()
  34.     turtle.select(1)
  35.     turtle.place()
  36. end
  37.  
  38. while turtle.getFuelLevel() <= 200 do
  39.     turtle.select(16)
  40.     turtle.refuel(16)
  41. end
  42.  
  43. while true do
  44.     local success, data = turtle.inspect()
  45.         if success then
  46.             if data.name == "minecraft:oak_log" then
  47.                 harvest()
  48.                 goDown()
  49.                 InOutChest()
  50.                 plant()
  51.             else
  52.                 sleep(30)
  53.                 turtle.suckUp()
  54.                 turtle.suckDown()
  55.             end
  56.         end
  57. end
RAW Paste Data