Ore Regeneration

Hello, friends! I am a beginner data packer and I have an idea for a Minecraft map for version 1.21.5

The idea is that in the world we have many blocks, for example, iron ore (applies to all ores). You mine one block and it turns into a cobblestone, and after a while it returns back to iron ore. Other ores do not change at this time, but if you start breaking them, they also turn into a cobblestone and after a while (from the moment you broke the block) they return back to the type of ore before the moment of mining.

Continue to help post