Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local currentYPosition = 0
- --[[
- This program will assume that the turtle is located at the bottom left of the tree
- this program only works for jungle trees(sorta) and huge spruce trees
- LL
- LL
- T
- L is log
- T is turtle
- ]]
- function chopTree()
- turtle.dig()
- turtle.forward()
- repeat
- turtle.dig()
- turtle.digUp()
- turtle.up()
- currentYPosition = currentYPosition + 1
- until not turtle.detect()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- for i = currentYPosition-1,0,-1 do
- turtle.dig()
- turtle.digDown()
- turtle.down()
- end
- turtle.dig()
- turtle.back()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- while true do
- turtle.select(16)
- if turtle.compare() then
- chopTree()
- turtle.turnLeft()
- turtle.turnLeft()
- for i = 1,15 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.select(16)
- turtle.drop(turtle.getItemCount()-1)
- turtle.up()
- turtle.select(1)
- turtle.suck(4)
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.turnRight()
- turtle.forward()
- turtle.placeDown()
- turtle.turnLeft()
- turtle.back()
- turtle.placeDown()
- turtle.back()
- turtle.down()
- turtle.turnRight()
- turtle.back()
- turtle.turnLeft()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement