Topic category: Advanced modding
I am new to the world of coding and have been repeating confusing myself with placing and aligning commands in order to make them do what I want. I want to know how to code an item so that when I right-click the item all of a specific block in the dimension will change into a different block. For example, I right click my custom item and all the stone blocks in the world transform into diamond blocks. I want to make it so that the specific pre-existing blocks change and not any stone placed after I used the item and the code finished executing.
If you're also up to the challenge, I would love it if you explained to me how to convert a specific block like before, but now only on a specific y level. Again, for example I want my stone blocks to convert into diamond blocks. But now, I want only the stone blocks on Y level 9 to change into diamond blocks and not on any other level.