7 posts
Posted 07 March 2012 - 08:26 PM
I've been trying to place a torch with turtle.placeUp() from slot 4, and I've noticed that when there isn't a valid place for a torch, instead of returning false, it simply pulls a block, in my case from slot 1, and places that instead. My question is, is there a way to get around this that doesn't involve moving the turtle, or am I out of luck?
473 posts
Location
Poland
Posted 07 March 2012 - 08:35 PM
well, simply do a check what block actually got placed and if it's not the correct one, dig it. (won't work on glass-lie things, tough)
7 posts
Posted 07 March 2012 - 09:07 PM
The program doing this is designed to require no user interaction after starting it though. I just checked, and torches detect just like a normal block, so I don't think that is what I'm looking for, sorry.
473 posts
Location
Poland
Posted 07 March 2012 - 09:18 PM
it is. You don't check the BLOCK, you check the INVENTORY. If a block got removed form the torches slot, it's all good. If not, break it. Simple as that.
7 posts
Posted 07 March 2012 - 09:28 PM
Ah, I get it, that seems easy enough to do, thanks! :mellow:/>/>