I am building a datapack and I want to replace how diamonds and emeralds function by modifying their generation behavior. But I don't know if this is A : possible and B : worth my time looking in to. I did some research but could not find anything that was up-to-date with or answered when 1.18.x was around. I was told here in the comments that there was a command called
/locateblock but I couldn't find anything on the wiki about the command or anything like it. So I am lead to believe that the command doesn't exist. If this is possible via Spigot or Fabric/Forge (As long as it is server-side) I would be willing to use a plugin/mod but I would like to avoid doing so.
If anyone is interested in or needs to know why I want to do this, I am extending on my question here to get closer to adding custom ores and gemstones without (hopefully) mods/external APIs.