This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
angellus's profile picture

[Turtle] Detect passable blocks

Started by angellus, 14 April 2014 - 03:29 AM
angellus #1
Posted 14 April 2014 - 05:29 AM
With ComputerCraft 1.6 I noticed that the turtle detect functions now return true if you use them on liquids (I assume this is on purpose). Like wise, can you can do a compare on them, but you cannot actually ever get a true because in survival, it is not possible to get source blocks.

My suggestion is a function like turtle.isPassable() or something that would check if the block the turtle is looking at is passable (like a liquid).

I know that it is probably on purpose there is not a turtle.getItemID() method, so that is why I hope my suggestion is mild enough to be acceptable. I need it because without it, I cannot find a viable way to deal with liquids in my branch mining program in 1.6.


EDIT: I should probably make another topic for this, but it is very related. Also a function to test if a block is indestructible (like bedrock). Currently the way I test for bed rock is try to mine it X number of times and if it does not work, it must be bedrock. The problem with that is that it makes my programs take ALOT longer to run.
Edited on 14 April 2014 - 03:38 AM
Bomb Bloke #2
Posted 14 April 2014 - 08:56 AM
With ComputerCraft 1.6 I noticed that the turtle detect functions now return true if you use them on liquids (I assume this is on purpose).

Intentional or not, it strikes me as being the probable direct cause of this bug - or another symptom of the one underlying cause.
Edited on 14 April 2014 - 06:56 AM