Posted 10 January 2013 - 11:13 AM
I am trying to code a program that will plant saplings for 2x2 fir tree from the xl biomes mod (im in the ftb mindcrack pack, latest update)
i have saplings for it in slot 1,
this is my code at the moment.
if turtle.compare() ~= "result" and turtle.detect ~= "result" then
this line, which compares the block in front, to the saplings, and also checks to see if the space is empty,
only if it not saplings, and empty, should it do the bit after, which involves planting the saplings, but this is not the case
it plants saplings regardless, or rather tries to, even when the tree has grown, which breaks its positioning.
also i seem to be unable to compare the fir wood i get,
the shell.run("firtree") is an established program i wrote, that will completely harvest the wood of a 2x2 tree.
thank you for reading, extra thanks for any possible help you may render
i have saplings for it in slot 1,
this is my code at the moment.
while true do
turtle.select(1)
turtle.down()
if turtle.compare() ~= "result" and turtle.detect ~= "result" then
turtle.up()
turtle.forward()
turtle.placeDown()
turtle.forward()
turtle.placeDown()
turtle.turnRight()
turtle.forward()
turtle.placeDown()
turtle.turnRight()
turtle.forward()
turtle.placeDown()
turtle.forward()
turtle.turnRight()
turtle.forward()
turtle.turnRight()
turtle.down()
end
turtle.up()
if turtle.detect() == "result" then
shell.run("firtree")
turtle.turnRight()
for i = 2,16 do
turtle.select(i)
turtle.drop()
end
turtle.turnLeft()
end
if redstone.getInput("back") == "true" then
break
end
sleep(10)
end
if turtle.compare() ~= "result" and turtle.detect ~= "result" then
this line, which compares the block in front, to the saplings, and also checks to see if the space is empty,
only if it not saplings, and empty, should it do the bit after, which involves planting the saplings, but this is not the case
it plants saplings regardless, or rather tries to, even when the tree has grown, which breaks its positioning.
also i seem to be unable to compare the fir wood i get,
the shell.run("firtree") is an established program i wrote, that will completely harvest the wood of a 2x2 tree.
thank you for reading, extra thanks for any possible help you may render