tree

                Never    
Lua
       
function getSaplings()
  repeat
    turtle.suckUp()
    if not turtlelib.isEqual(turtle.getItemDetail(), 'minecraft:oak_sapling') then
      turtle.drop()
    end
  until turtle.itemCount() > 0
end

os.loadAPI('turtlelib')
while true do
repeat
  os.sleep(1)
until turtlelib.isInFront("minecraft:log")
turtle.dig()
turtle.forward()
local height = 0
while turtlelib.isAbove('minecraft:log') do
  turtle.digUp()
  turtle.up()
  height = height + 1
end
for i=height,0,-1 do
  turtle.down()
end
turtle.back()
turtle.place()
end

Raw Text