Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- height = 0
- function checkFuel()
- if turtle.getFuelLevel() >= 14 then
- return true
- else
- return false
- end
- end
- function sortInv()
- for x=1, 16 do
- turtle.select(x)
- if turtle.getItemDetail().name == "Spruce Sapling" then
- turtle.transferTo(16)
- end
- end
- end
- function harvestTree()
- if fuelCheck() == true then
- turtle.moveDown()
- turtle.dig()
- turtle.moveUp()
- sortInv()
- turtle.select(16)
- turtle.place()
- while turtle.detect() do
- turtle.dig()
- if turtle.detectUp() then
- turtle.digUp()
- end
- turlle.moveUp()
- height = height + 1
- end
- for x=1, height do
- turtle.moveDown()
- height = height -1
- end
- end
- end
- while turtle.detect() do
- harvestTree()
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement