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

what code line would i need to use for turtle to detect particular block ids?

Started by CreeperGoBoom, 30 May 2014 - 03:37 AM
CreeperGoBoom #1
Posted 30 May 2014 - 05:37 AM
is there a way for a turtle to determine if its near a particular block without carrying that block in inventory?

example:
over white wool, road outline
over black wool:: road surface

can this be done? or something similar like (next to or over an iron block)

im an Infrastructure Development Manager on a server, thinking of somehow to assist with road building using turtles
Edited on 30 May 2014 - 03:38 AM
theoriginalbit #2
Posted 30 May 2014 - 06:31 AM
nope, definitely no way other than to compare to an item in the Turtle's inventory.
CreeperGoBoom #3
Posted 30 May 2014 - 07:18 AM
ok thanks :D/>

edit; is there an upcoming update to openperipherals that might be able to do this?
Edited on 30 May 2014 - 05:21 AM
apemanzilla #4
Posted 30 May 2014 - 01:33 PM
ok thanks :D/>

edit; is there an upcoming update to openperipherals that might be able to do this?
Most likely not.
theoriginalbit #5
Posted 30 May 2014 - 03:04 PM
edit; is there an upcoming update to openperipherals that might be able to do this?
not that I know of; also Mikee would fight it, stating it was to over powered.
Bomb Bloke #6
Posted 30 May 2014 - 03:16 PM
I gather Aperture Science turtles might be able to pull it off, but I suspect they're not available for whatever version of minecraft you're using.

To a point, you can do this by checking whether the block next to a turtle is a given type of peripheral. Obviously OpenPeripheral extends the range of blocks which can be detected in this manner, but wool can't be picked up via this method.
CreeperGoBoom #7
Posted 31 May 2014 - 02:34 AM
thanks bomb bloke ill give that a shot

edit:hmm cant seem to get any block to appear as a form of peripheral other than the terminal glasses bridge or a chest, or anything else other than the blocks designated as "peripherals" like note blocks
Edited on 31 May 2014 - 01:13 AM
Bomb Bloke #8
Posted 31 May 2014 - 06:37 AM
That's what I mean by "to a point". Wool, for example, isn't a peripheral and so can't be detected by looking for peripherals… I suspect railcraft tank blocks might make for a good cheap-ish "road".