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

how to detect a type of block?

Started by dextermb, 11 September 2012 - 11:28 AM
dextermb #1
Posted 11 September 2012 - 01:28 PM
How do you detect what type of block is in front of the turtle?

(eg: if cobblestone is in front of the turtle then go up, and forwards)
MetalGearMuffin #2
Posted 11 September 2012 - 01:38 PM
I'm no expert programmer, but if you put a piece of cobble in the inventory of the turtle you can do a compare to the block infront of it, if it returns true then make the turtle move up and forward.
dextermb #3
Posted 11 September 2012 - 02:05 PM
I'm no expert programmer, but if you put a piece of cobble in the inventory of the turtle you can do a compare to the block infront of it, if it returns true then make the turtle move up and forward.

Ok thanks :D/>/> i'll do some testing

(i've started writing an advanced mining bot)