I'm now some days into that project but I can't find any precise help for my problem,
The thing is, I want to setup a cave where one can mine ore and after a while they respawn on the same place.
(Minecraft version is 1.12.2)
The way I tried to achieve that is by checking if there is air in the block I want to supply, then if there is air, I summon an AreaEffectCloud on the spot where the ore was (which I use as a timer), and I have another command block placing a diamond or just before the AreaEffectCloud dies.
The problem is I also have to check if there is an AreaEffectCloud already in that place and I can't get it to work properly without having either a Cloud summoned every tick, or no Cloud summoned at all.
First picture shows the diamond ore's location and the second one shows the cloud
I have a separate module used to spawn the diamond ore, the one on the pictures only serves the purpose of spawning the cloud
-Brown area is used to check if there is an ore,
-Yellow area is used to check if there is an AreaEffectCloud
-Red area resets the "path chosing command blocks" on the angles
-Green area summons the AreaEffectCloud,
Thanks for every bit of help !
*My goal is to not have any visible blocks, that's why I'm not using Observers
*If there is any way to detect if a block has just been mined, that would save my life
*One of my aim is to put like 10-15 of these modules on 4-5 differents cave, so do you think this will create a lot of lag ? I'm not used to using that many command blocks and your thoughts might help me a lot !
Also I knew about this objective, but I had no idea how to use them,
So your answer made me think, instead of checking in a loop if the diamond ore is there, is it possible to check only when this objective gets another point ? That could help a lot with lags !
(There is no way to know exactly which block has been mined right ?)
Thank your for your answer !
I was thinking, since the ore spots are fixed. Have an area effect cloud constantly there, and just detect at the area effect cloud if the block is air, add the score. When the core reaches a certain mark, setblock then reset.