function hugg()
turtle.dig()
turtle.forward()
while turtle.detectUp() do
turtle.digUp()
turtle.up()
end
while not turtle.detectDown() do
turtle.down()
end
turtle.back()
end
function bonemeal()
rs.setOutput("left", true)
sleep(0.5)
rs.setOutput("left", false)
sleep(0.5)
end
function hanterablocket()
if turtle.compare() then
bonemeal()
else
hugg()
end
end
function planthugg()
if turtle.detect() then
hanterablocket()
else
turtle.place()
end
end
while true do
planthugg()
end
Comments