Entity Damage Immunities don't have custom damage types

Started by Isalick34 on

Topic category: Feature requests and ideas for MCreator

Active 2 days ago
Joined Oct 2021
Points:
672

User statistics:

  • Modifications: 0
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 76
Entity Damage Immunities don't have custom damage types

I noticed that in the Behavior section of entities, the "Entity Immune to" section doesn't include custom damage types yet, so It would be nice if that was added.

Active 9 months ago
Joined Feb 2023
Points:
359

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 31
You could use the 'On entity…
Wed, 04/24/2024 - 23:54

You could use the 'On entity hurt' global trigger, and check if damage source = custom damage AND entity type = entity type you want it to be immune to. Should it return true, cancel the event.

It could still show some effects of damage, but the not the i-frames and the entity won't be hurt overall.

Active 2 days ago
Joined Oct 2021
Points:
672

User statistics:

  • Modifications: 0
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 76
how do you cancel the event?
Thu, 04/25/2024 - 01:13

how do you cancel the event?

Active 9 months ago
Joined Feb 2023
Points:
359

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 31
In 'advanced procedures',…
Fri, 04/26/2024 - 12:33

In 'advanced procedures', you will find a block called 'Cancel event that triggered global trigger'. Because the block only cancels global triggers, it's why you need to use a global trigger for the procedure to work.

Active 2 days ago
Joined Oct 2021
Points:
672

User statistics:

  • Modifications: 0
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 76
oh ok thanks
Fri, 04/26/2024 - 13:19

oh ok thanks

Active 2 days ago
Joined Oct 2021
Points:
672

User statistics:

  • Modifications: 0
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 76
This actually helps a ton…
Fri, 04/26/2024 - 13:25

This actually helps a ton because this allows me to get NBT data from an entity as it dies by canceling the event and then killing them again with the provided damage source.

Active 9 months ago
Joined Feb 2023
Points:
359

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 31
No problem!
Sat, 04/27/2024 - 04:09

No problem!

Active 13 hours ago
Joined Nov 2024
Points:
154

User statistics:

  • Modifications: 0
  • Forum topics: 17
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 33
Can anyone provide a…
Mon, 06/02/2025 - 03:28

Can anyone provide a screenshot of the block setup for this please? I'm having trouble setting it up.

Active 3 months ago
Joined Jul 2022
Points:
513

User statistics:

  • Modifications: 1
  • Forum topics: 11
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 59
I used this too and it…
Tue, 06/03/2025 - 05:11

I used this too and it worked perfectly in 1.20.1 but now in 1.21.1 the procedure doesn't compile if there is "cancel event that triggered global trigger" in it, and now I am again looking for how to make entities immune to custom damage types.

Active 2 days ago
Joined Oct 2021
Points:
672

User statistics:

  • Modifications: 0
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 76
That's my bad, it should…
Tue, 06/03/2025 - 14:41

That's my bad, it should actually be the "Entity is Attacked" Global trigger.

Active 13 hours ago
Joined Nov 2024
Points:
154

User statistics:

  • Modifications: 0
  • Forum topics: 17
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 33
Thank you! Works just as it…
Tue, 06/03/2025 - 22:56

Thank you! Works just as it should with that modification.

Active 3 months ago
Joined Jul 2022
Points:
513

User statistics:

  • Modifications: 1
  • Forum topics: 11
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 59
Not for me, I tried "entity…
Wed, 06/04/2025 - 10:16

Not for me, I tried "entity is attacked", "entity is hurt" and both "entity suffers damage", none compile if there is a "cancel" block in them.

Active 13 hours ago
Joined Nov 2024
Points:
154

User statistics:

  • Modifications: 0
  • Forum topics: 17
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 33
Try going to trigger of the…
Wed, 06/04/2025 - 20:08

Try going to trigger of the selected entity and apply the procedure to "entity is hurt" trigger if you're applying it to a custom mob

 

Active 2 days ago
Joined Oct 2021
Points:
672

User statistics:

  • Modifications: 0
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 76
you don't want to do the…
Fri, 06/06/2025 - 01:28

you don't want to do the procedure in the enemy itself, you have to make a separate one that's just using a global trigger