Entity can only be damaged if player has effect? HELP!

Started by WoLfPlaysStuff on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Entity can only be damaged if player has effect? HELP!

I'm making a mod where there are multiple bosses and enemies, but they can only be damaged if you have a specific effect on... how do i do this

Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In order to do this, on each…
Sun, 01/28/2024 - 19:43

In order to do this, on each one of your bosses, go to the triggers tab, then create a procedure for "when entity is hurt".

Then do:

If [Not [Has Source entity active effect : [whatever ur effect is named]]

Then, [Cancel event that triggered global trigger]

(this procedure block can be found in the advanced category)

If this doesn't work, tell me, because there is possibly other ways to do it that i didn't think about.