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

Commandblock Api Addition

Started by spdkils, 04 November 2013 - 07:07 PM
spdkils #1
Posted 04 November 2013 - 08:07 PM
With the addition of the testforbock x y z tile… And command blocks out outputting actual reults to a comparator, as well as text inside the gui, it would be nice to update the commandblock api to eat both those results.

This would enable you to get the block type directly using the command block without doing any sort of a loop.

it prints out 'false' got type block.name grass block.

So if you can get those results, then you can use a command block, to replace replicate an aweful lot of the sensor addon.

Use GPS to tell the command block computer where you're at… Ask it to test the block, get the results as text, and now you know it's grass, or what have you, dig or not dig based on that return. Now you have actual sensors capability on your turtle, just using modems, and command block.
Lyqyd #2
Posted 04 November 2013 - 08:25 PM
You can already get the analog redstone results. Look at the redstone API. Command blocks don't return text results for what the block actually is, so far as I know, just the redstone output that it was or was not what you tested for. What you're asking is just another iteration of the same request that's been made over and over again. Computers will likely never gain the ability to determine what a block is beyond the turtle.compare feature. In fact, it's in the Suggestions Not To Make list!

Locked.