36 posts
Posted 26 February 2012 - 10:49 PM
I would really like for this to be implemented, if this is not available. turtle.detect() I think only returns 1 or 0, but extending it would work very well and it wouldn't affect many programs. All that would have to be changed is from == 1 to >= 1, and I hardly believe this is hard to fix. turtle.detect() will return a block ID number (so redundant). A database (encoded array or table) file found in the ROM, which contains all block IDs either scanned on mod startup or updated via HTTP could be accessed later to convert this ID into a string. Any ideas besides shooting mine down? :D/>/>
(Darn, that auto title fixer is worsening my capitalization!)
473 posts
Location
Poland
Posted 26 February 2012 - 10:51 PM
it's not available, dunno about the future though
411 posts
Posted 26 February 2012 - 11:07 PM
The #1 reason that there will never be a direct way to access the blockid or blockname is that those 2 pieces of information can change. Therefor if I wrote a code that used 1 blockid or 1 name it might not work on someone elses CC.
There will be a way to do a sort of check on what your mining eventually, it just hasn't been added yet.
724 posts
Posted 27 February 2012 - 02:07 PM
Can it be expanded like:
bool,name,id,meta=turtle.detect()
so it will not interfere existent programs
name would dependent of language, id of mods installed, but it is at least will give some info to know. For example program can search for " Ore" at the end of name or have a configurable list of ids. Turtle can search for a block with name, it got from user or names can be written in blueprint. Or turtle can report to user "Bedrock found, cannot dig". The need is quite more, than this reason.
And I want ask for eye for turtle. In separate thread.
What way are you talking about?