Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function plantTree()
- turtle.select(16)
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.place()
- turtle.turnLeft()
- turtle.back()
- turtle.turnRight()
- turtle.place()
- turtle.turnLeft()
- turtle.back()
- turtle.place()
- turtle.select(1)
- end
- function cutTree()
- turtle.dig()
- turtle.forward()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- while turtle.detectUp() do
- turtle.digUp()
- turtle.up()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- while not turtle.detectDown() do
- turtle.down()
- end
- turtle.back()
- plantTree()
- end
- function checkGrowth()
- turtle.up()
- if turtle.detect() then
- cutTree()
- else
- turtle.down()
- end
- end
- function loop()
- if not turtle.detect() then
- plantTree()
- end
- checkGrowth()
- sleep(10)
- loop()
- end
- loop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement