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

How can I identify a block without mining it?

Question

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.

Cheers

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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