Topic category: Help with Minecraft modding (Java Edition)
I'm trying to create a variant of End Crystals that have a gamerule specified cooldown for some PvP testing. I have pretty much everything else figured out, but I can't seem to get the placement mechanics. I have the check for Obsidian and Bedrock, but it is really only the offset that I'm struggling with. I'm aware that I probably could get it to work with a ludicrous amount of "if" statements and specified offsets for various placement conditions, but I'd really like to avoid that spaghetti code for what's seemingly simple.
Confirmation would also be appreciated for if I should continue using a block or switch to an item for this, and how I would only allow the entity summoning if that block/item was used.
In case the information is helpful, I am using the default 1.21.4 NeoForge MCreator profile.
Regards,
ReddishAcorn.
Spawn entity at x + 0.5, y + 1, z + 0.5 no?I think that should work
It's a great idea for summoning, but I still need a way to delete the block I placed. It's partly why I ask if using an item would be more apt. In the attached image below (ignore programmer art and random wait), I'm really just trying to figure out the "Get block" and "Remove block" parts down, as those will obviously be the same direction. After that, it's golden.
Though, I again wonder about the item thing (and the checks involved there), which is why I'm consulting the experts.