Advertisement
SenpaiJody

LumberBot

Mar 24th, 2022 (edited)
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.29 KB | None | 0 0
  1. while true do
  2.    
  3.     local boolInspect, inspect = turtle.inspect()
  4.     local y = 0
  5.    
  6.     if inspect["name"] == "minecraft:log" then
  7.        
  8.         turtle.suckDown(4)
  9.  
  10.         if turtle.getFuelLevel() < 9000 then
  11.             turtle.turnRight()
  12.             turtle.dig()
  13.             turtle.forward()
  14.             turtle.select(16)
  15.             turtle.suck(64)
  16.             turtle.refuel()
  17.             turtle.drop(64)
  18.             turtle.select(1)
  19.             turtle.back()
  20.             turtle.turnLeft()
  21.         end
  22.        
  23.         turtle.dig()
  24.         turtle.forward()
  25.        
  26.         while inspect["name"] == "minecraft:log" do
  27.             turtle.dig()
  28.             turtle.digUp()
  29.             turtle.up()
  30.             boolInspect, inspect = turtle.inspectUp()
  31.             y = y + 1
  32.         end
  33.         turtle.dig()
  34.         turtle.digUp()
  35.         turtle.up()
  36.         y = y + 1
  37.        
  38.         turtle.turnLeft()
  39.         turtle.dig()
  40.         turtle.forward()
  41.         turtle.turnRight()
  42.         turtle.dig()
  43.        
  44.         for i=y, 1, -1 do
  45.             turtle.digDown()
  46.             turtle.down()
  47.             turtle.dig()
  48.         end
  49.        
  50.         turtle.place()
  51.         turtle.turnLeft()
  52.         turtle.back()
  53.         turtle.place()
  54.         turtle.turnRight()
  55.         turtle.place()
  56.         turtle.back()
  57.         turtle.place()
  58.     end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement