Posted 13 April 2016 - 05:44 PM
I've wanted to make a single tree tree farm using a turtle. I've tested each action in the interactive lua prompt (dig, place, etc.) but the full program doesn't work.
turtle.select(16)
turtle.refuel()
while turtle.getFuelLevel() > 7 do
turtle.select(16)
turtle.suckDown()
turtle.select(1)
stop = false
up = 0
while not stop do
if turtle.inspectUp == "17" then
turtle.dig()
if turtle.detectUp() then
turtle.digUp()
end
turtle.up()
else
stop = true
end
turtle.select(2)
turtle.drop()
turtle.select(16)
turtle.refuel()
for i = 0, up do
turtle.down()
end
up = up + 1
stop = up <= 7
end
if not turtle.detect() then
turtle.select(1)
turtle.place()
end
sleep(10)
end
[\code]
The turtle should go up and down the tree, break the log blocks, put a sapling on the dirt, get refueled from a chest on the bottom, and put the wood in a chest to the side.
I've tried finding a solution for about an hour but it only puts down saplings and waste my fuel...