Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = 0
- function mineUp()
- turtle.dig()
- turtle.digUp()
- turtle.up()
- end
- function mineTree()
- mineUp()
- mineUp()
- mineUp()
- mineUp()
- mineUp()
- mineUp()
- mineUp()
- mineUp()
- mineUp()
- mineUp()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- end
- function checkTree()
- turtle.turnLeft()
- success, data = turtle.inspect()
- if data.name == "minecraft:log" then
- mineTree()
- end
- turtle.turnRight()
- end
- function moveSix()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- end
- print("+-------------------------------------+")
- print("| Auto Tree Farm Feller |")
- print("+-------------------------------------+")
- print("| Slot 1: Fuel |")
- print("+-------------------------------------+")
- print("| Place turtle facing towards desired |")
- print("| direction on same level as tree to |")
- print("| the right of the tree. Insert fuel. |")
- print("| Press enter to start. |")
- print("+-------------------------------------+")
- print("| Trees to check = ? |")
- print("+-------------------------------------+")
- nc = tonumber(read())
- turtle.refuel()
- while nc > n do
- checkTree()
- moveSix()
- n = n + 1
- end
- turtle.turnRight()
- turtle.turnRight()
- for a=1,nc,1 do
- moveSix()
- end
- turtle.turnRight()
- turtle.turnRight()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement