Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clearTree()
- turtle.dig()
- turtle.forward()
- local cleared = false
- local tempHeight = 0
- repeat
- local tempBlock, n = turtle.inspectUp()
- if tempBlock then
- if n.name == "minecraft:log" then
- tempHeight = tempHeight + 1
- turtle.digUp()
- turtle.up()
- end
- else
- cleared = true
- end
- until(cleared == true)
- repeat
- turtle.down()
- tempHeight = tempHeight - 1
- until (tempHeight == 0)
- turtle.back()
- end
- function nextTreeInRow()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- end
- function goToNextRow()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- function returnToStart()
- --16
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- for i = 0, 16, 1
- do
- turtle.forward()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- function startOfRow()
- turtle.turnRight()
- for i = 0, 12, 1
- do
- turtle.forward()
- end
- end
- local length = 4
- local width = 5
- for w = 1, width, 1
- do
- for l = 1, length, 1
- do
- clearTree()
- nextTreeInRow()
- end
- startOfRow()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement