Custom potion effects didn't work on boss-type entity

Started by BBBOY on

Topic category: Help with MCreator software

Active 1 year ago
Joined Jan 2024
Points:
138

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
Custom potion effects didn't work on boss-type entity

I made a weapon enchantment that applies a custom potion effect to a target entity, but it doesn't work on boss-type entity (wither and ender dragon). Is there any way to make it work?

Active 1 day ago
Joined May 2022
Points:
1267

User statistics:

  • Modifications: 15
  • Forum topics: 25
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1142
If you're using the 'item in…
Tue, 01/02/2024 - 12:40

If you're using the 'item in main hand' or 'item in inventory tick' trigger, it's possible it's only targeting players holding the item. Try making a procedure that triggers on entity update tick, (not player update tick), checks if the item in the main hand of the event/target entity has your custom enchantment, and, if it does, apply the potion effect. (Also double check your entity doesn't have potion immunity turned on- it's also possible enabling a boss bar turns this on by default, in which case you might have to remove it manually.)