SHARE
TWEET

Untitled

a guest Apr 19th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local block,type = turtle.inspect()
  2. local tree = 0
  3. local upTree = 0
  4.  
  5. function chopTree()
  6.  upTree = 0
  7.  block,type = turtle.inspectUp()
  8.  while type.name == "ic2:rubber_wood" do
  9.   turtle.digUp()
  10.   turtle.up()
  11.   block,type = turtle.inspectUp()
  12.   upTree = upTree + 1
  13.  end
  14.  for i = 1,upTree,1 do
  15.   turtle.down()
  16.  end
  17. end
  18.  
  19. function cutRow()
  20.  tree = 0
  21.  while tree < 5 do
  22.   tree = tree + 1
  23.   if turtle.detect() == true then
  24.    turtle.dig()
  25.    turtle.forward()
  26.    turtle.digDown()
  27.    turtle.select(1)
  28.    turtle.placeDown()
  29.    chopTree()
  30.    if tree == 4 then
  31.     if direct == 0 then
  32.      turtle.forward()
  33.      turtle.forward()
  34.      turtle.turnLeft()
  35.      turtle.forward()
  36.      turtle.forward()
  37.      turtle.forward()
  38.      turtle.turnLeft()
  39.      direct = direct + 1
  40.     else
  41.      turtle.forward()
  42.      turtle.forward()
  43.      turtle.turnRight()
  44.      turtle.forward()
  45.      turtle.forward()
  46.      turtle.forwardRight()
  47.      direct = direct - 1     
  48.     end  
  49.    else
  50.     turtle.forward()
  51.     turtle.forward()
  52.    end
  53.     turtle.select(1)
  54.   else
  55.    if tree == 4 then
  56.     if direct == 0 then
  57.      turtle.forward()
  58.      turtle.forward()
  59.      turtle.forward()
  60.      turtle.turnLeft()
  61.      turtle.forward()
  62.      turtle.forward()
  63.      turtle.forward()
  64.      turtle.turnLeft()
  65.      direct = direct + 1
  66.     else
  67.      turtle.forward()
  68.      turtle.forward()
  69.      turtle.forward()
  70.      turtle.turnRight()
  71.      turtle.forward()
  72.      turtle.forward()
  73.      turtle.forward()
  74.      turtle.turnRight()
  75.      direct = direct - 1     
  76.     end
  77.    else
  78.     turtle.forward()
  79.     turtle.forward()
  80.     turtle.forward()
  81.    end
  82.   end
  83.  end
  84. end
  85.  
  86. cutRow()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top