Started by
Cole Snapper
on
Topic category: Help with Minecraft modding (Java Edition)
I have a procedure where it's supposed to check if a mob is in a custom tag and if they are, then it is supposed to do nothing. I have iron golems, snow golems, the warden, and the "minecraft:bosses" tag included in my custom tag, and yet, it still affects them. Weird thing is that I have a variant of this procedure in a different mod and there, it works just fine. I am using mcreator 2024.4 for Minecraft forge 1.20.1.
Update:
I deleted the potion for now, I didn't want to be stuck on something that overall, wasn't all that important to the mod. I'll recreate it when I get around to it. For now, this is halted until I recreate the potion.
Edited by Cole Snapper on Sat, 06/13/2026 - 18:58
Try making a procedure with the "on entity tick update procedure" get whether event/target entity has the tag and if they do make it constantly clear the effect.
In my previous testing, the effect's procedure would still run even when the effect itself was removed.
Why is that a problem? Is it lagging your game?
If you don't want it to still run even after it checks for the tag then just check if they have any potion effect with a custom code snippet and this might work: !((LivingEntity)entity).getActiveEffects().isEmpty()
I probably should have mentioned that it is actually three entities, and they're all in vanilla; Iron Golem, Snow Golem, and the Warden.
This means I cannot use an entity tick update procedure on them. The problem is I do not understand why putting them in a tag worked the first time around but doesn't work this time.
Why don't you just make a seperate procedure for all of the entitys? There are not that many of them.
Because there is no code block that lets me select one specific entity by itself. I can check for a tag but, as I already established, that doesn't work. I can check for a specific creature type but, that would affect all entities of that type, some of which I do actually want to affect. I can check for all kinds of things related to an entity but, I cannot check for a specific entity.
Is this what you are trying to do? If not I'm out of ideas
https://imgur.com/a/3Y5oj2y