Posted 22 September 2012 - 03:27 AM
I was writing my own tree farm to learn the lua code, and i came up with this
place an sapling, then use bone meal on it, then cut the whole tree down and if there is an block blocking the turtle it will break it and when finishes cutting the it would com back down and do all that again
The problem is, the line:
local x = 1
while x < 11 do
turtle.place()
turtle.select(2)
turtle.place()
turtle.select(1)
if turtle.detect() then
turtle.dig()
turtle.up()
if turtle.detectUp() then
turtle.digUp()
if not turtle.detect() and not turtle.detectDown() then
turtle.down()
x = x+1
end
end
end
what this should do:place an sapling, then use bone meal on it, then cut the whole tree down and if there is an block blocking the turtle it will break it and when finishes cutting the it would com back down and do all that again
The problem is, the line:
if not turtle.detect() and not turtle.detectDown() then
turtle.down()
is not working can somebody help me?