* When it's the wood log it encounters, it chops down the entire tree, plants a sapling and carries on - to the next tree.
* When it encounters a sapling, it waits until it grows. Then a wood log should appear and the cycle would begin from the beginning ( a tree's getting chopped down, the sapling is left in place and so on ).
The problem is with my waiting bit. It's something like this:
turtle.select(1) --the slot with saplings
while turtle.compare() do
sleep(10)
end
Simple, eh? The sad thing is, that it doesn't work. After waiting some time ( Minecraft days for instance ), the turtle.compare() function eventually returns false even though the sapling is still there. The outcome is far from expected: after some time, every tree is gone and no saplings are deployed.
I presume the malfunction takes place right when a tree is about to grow, but it's only an assumption (because I have to wait, it doesn't happen right away). However, even if I wait few seconds after the malfunction, the sapling stays. I've even tried resetting the slot selected and moving the turtle back and forth hoping the turtle will get set right afterwards. It doesn't.
Maybe the sapling changes its block ID and it's no longer the same? Unfortunately I'm not able to check that with the turtles themselves. It either fails or not, it doesn't tell me why it failed.
Any ideas how to debug this script? I'm lacking some knowledge on turtles; maybe there are some magic functions that would give me some more details on why turtle is not seeing my sapling as it should. Cheers, Tom