[HALTED] [NOT SOLVED] Custom potion affects mobs I don't want it to affect.

Started by Cole Snapper on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[HALTED] [NOT SOLVED] Custom potion affects mobs I don't want it to affect.
Sat, 06/13/2026 - 18:58 (edited)

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
Joined Jun 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try making a procedure with…
Wed, 06/10/2026 - 14:01

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. 

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In my previous testing, the…
Wed, 06/10/2026 - 22:42

In my previous testing, the effect's procedure would still run even when the effect itself was removed.

Joined Jun 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Why is that a problem? Is it…
Wed, 06/10/2026 - 23:36

Why is that a problem? Is it lagging your game?

Joined Jun 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you don't want it to…
Wed, 06/10/2026 - 23:49

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()

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I probably should have…
Thu, 06/11/2026 - 23:33

I probably should have mentioned that it is actually three entities, and they're all in vanilla; Iron Golem, Snow Golem, and the Warden.

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This means I cannot use an…
Thu, 06/11/2026 - 23:37

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.

Joined Jun 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Why don't you just make a…
Fri, 06/12/2026 - 00:31

Why don't you just make a seperate procedure for all of the entitys? There are not that many of them.

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Because there is no code…
Fri, 06/12/2026 - 23:51

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.