Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal


This topic is now archived and is closed to further replies.

  • 0

How can I identify a block without mining it?


I want to make a basic miner robot, and a nice addition would be to detect when it is adjacent to an ore of some kind. I have found two ways to achieve this by reading the documentation:

  • Have a sample of an ore of every kind laid out in the robot's inventory and use the robot's api `compare` function. However it will be cumbersome to always set up the inventory in the right order every time I place the robot.
  • Using the geolyzer's `analyze` function, however it seems to consume an enormous amount of energy, so it's not viable to use this at every step.
  • The database component seemed like a nice option at first. I can pre-configure it with all kinds of ores and then have the robot function similarly to option 1. However I found no method to compare to an adjacent block, only blocks in the robot's inventory.

As you can see, no option is exactly viable for my use case. Is there anything I'm missing? It feels weird that something like this is not available, otherwise robot functionality to "see" is very limited.


Share this post

Link to post
Share on other sites

1 answer to this question

Recommended Posts

I guess the geolyzer would be your best choice. I have not worked with them yet, but I guess you could do the following:

You scan a large area using the geolyzer,  so you don't use the 'analyze' method but the 'scan' method, that way you can scan large areas at once. This is going to take a while, it takes (I think) 0.05 s to scan one block. The max column height is 64 blocks (32 up and 32 down) but sadly I can't tell you what's the radius of the geolyzer. You don't get the kind of block at each position but the 'density' and ores have a high density. That way you scan the entire area and know exactly where ores are and you don't waste time and energy digging around (since you said you would like to scan adjacent blocks I guess your robot would strip mine?). 

Looking at Sangar's 'geo2holo' program might help understanding how the 'scan' method works. https://github.com/OpenPrograms/Sangar-Programs/blob/master/geo2holo.lua

Share this post

Link to post
Share on other sites

  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.