Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("moveAPI")
- function tree()
- moveAPI.move("f dd")
- turtle.placeDown()
- while turtle.detectUp() do
- moveAPI.move("u")
- end
- while not turtle.detectDown() do
- moveAPI.move("d")
- end
- end
- function row()
- for i = 1, 4 do
- if turtle.detect() then
- tree()
- else
- turtle.forward()
- end
- if i ~= 4 then
- moveAPI.move("f f f")
- end
- end
- moveAPI.move("f")
- end
- function main()
- moveAPI.move("u u u r f f f f f f l f f f")
- turtle.turnLeft()
- row()
- moveAPI.move("r f f f")
- turtle.turnRight()
- row()
- moveAPI.move("l f f f")
- turtle.turnLeft()
- row()
- turtle.turnLeft()
- moveAPI.repeatMoves("f", 12)
- moveAPI.move("l f f f f f f d d d")
- turtle.turnLeft()
- for i = 2, 16 do
- turtle.select(i)
- turtle.dropDown()
- end
- turtle.select(1)
- end
- turtle.select(1)
- itemDetail = turtle.getItemDetail()
- if itemDetail ~= nil and itemDetail.count >= 12 and itemDetail.name == "minecraft:sapling" then
- main()
- else
- error("put at least 12 saplings in slot 1")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement