Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- saplingSlot = 1
- bonemealSlot = 2
- function chopTree()
- turtle.dig()
- turtle.forward()
- while turtle.digUp() do turtle.up() end
- while turtle.down() do end
- turtle.back()
- end
- function fillChest()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.select(3)
- turtle.drop()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function detectTree()
- _, block = turtle.inspect()
- return block['name'] == "minecraft:log"
- end
- function makeTree()
- repeat
- turtle.select(saplingSlot)
- turtle.place()
- turtle.select(bonemealSlot)
- turtle.place()
- until detectTree()
- end
- while true do
- makeTree()
- chopTree()
- fillChest()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement