Advertisement
Ni_Jay_Ni

tf

Jun 14th, 2017
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.13 KB | None | 0 0
  1. h_table = {}
  2. width = 3
  3. length = 21
  4.  
  5. function mineTree()
  6.     height = 0
  7.     replanted = false
  8.     while turtle.detect() do
  9.           turtle.dig()
  10.           if replanted ~= true then
  11.             turtle.place()
  12.             replanted = true
  13.           end
  14.           if turtle.detectUp() then
  15.             turtle.digUp()
  16.           end
  17.         turtle.up()
  18.         height = height + 1
  19.     end
  20.     while height > 0 do
  21.       turtle.down()
  22.       height = height - 1
  23.     end
  24. end
  25.  
  26. function moveAround()
  27.     turtle.up()
  28.     turtle.forward()
  29.     turtle.forward()
  30.     turtle.down()
  31. end
  32.  
  33. h_table = {turtle.inspectDown()}
  34.  
  35. block_name = h_table[2]["name"]
  36.  
  37. if block_name ~= "chisel:stonebricksmooth" then
  38.   print("Please place me on: small stone bricks")
  39. else
  40.   print("Starting block confirmed")
  41. end
  42.  
  43. rows = 2
  44. f_table = {}
  45. for line=0,rows,1 do
  46.   for y=0,length,1 do
  47.     f_table = {turtle.inspect()}
  48.     if f_table[1] then
  49.       if f_table[2]["name"] == "minecraft:log" then
  50.         mineTree()
  51.         turtle.forward()
  52.       end
  53.     else
  54.         moveAround()
  55.     end
  56.   end
  57.   turtle.turnRight()
  58.   for x=0,width,1 do
  59.     turtle.forward()
  60.   end
  61.   turtle.turnRight()
  62.   x = 0
  63.   y = 0
  64. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement