Topic category: Help with Minecraft modding (Java Edition)
So I used to play on a Minecraft server called "Minecarts" (link to MinecraftForum.net page) back in beta 1.17, and they had this plugin that allowed Obsidian, Iron Blocks, Lapis Blocks, Gold Blocks, and Diamond Blocks to provide an anti-griefing "aura" around them tagged to the player as the "owner" of said aura with an aura ID number that was attached to your UUID. It was great, as it prevented mob and player griefing inside your build zone provided that you had enough resources to burn to properly protect it, and if you teamed up with other players or brought your friends along, you could "trust" them into your aura IDs and they have the same build rights as you do.
This server unfortunately shut down shortly after Minecraft 1.0 released, and they never released the source code to the custom plugin, and an entire 200+ player community around this niche server was left in the dark in it's wake, never to see another server like it ever again. But now that modding is seemingly somewhat easier than learning Java, I want to see if I can recreate a mod like this and provide another palatable flavor into self-service anti-griefing for vanilla-ish SMPs other than GriefPrevention with a golden shovel.
Right now I'm having a lot of trouble getting a mod that even properly detects which block I just placed, as if I were to place an Iron Block, I would want it to later generate an aura that protects all other blocks in its range. I'm not even sure if something like this is even possible with MCreator, but right now it's more approachable than trying to code it myself. I'm not finding any tutorials on how to make a Procedure that can detect when I place a specific block, or any block for that matter.
TLDR, long story short, I want to modify valuable solid ore blocks (iron, lapis, gold, diamond, etc) to provide an area of protection against mob-griefing (and ideally player-griefing as well), and this is my first time modding so I'm having trouble getting a mod working to detect when a specific block is placed. Right now I'm just trying to get a "Success" in chat if the mod detects that I've placed a dirt block, and from there I might figure out how to make an iron block do something else, like watch a set zone around the block to detect and prevent any unauthorized changes to the world.
This isn't something I necessarily want credit for, I just want to see this happen for the betterment of the community, so maybe this is also a call to action for anyone with experience with this kind of thing to help me revive possibly one of the best minecraft mods that's ever to have existed. Thanks in advance to anyone who can help me make my nostalgic fever dreams a reality once more!
Here is a way to do something when a specific block is placed by a player:
And to get the entity's UUID, it's not possible with MCreator, however there is a plugin for MCreator that allows you to check and put entity's UUID somewhere, basically it adds a procedure block for that:
https://mcreator.net/plugin/72173/uuid-procedures
Even though it's for pretty old MCreator and Minecraft versions, it may help you atleast make this possible on 1.15.2 and 1.16.4, 1.16.5 versions of Minecraft.
The rest is basically putting NBT tags on players and blocks, so it's possible if you know how to use procedures.
Good luck with your dream!