how to check if mob is a boss or not

Started by tntapplecraft YT on

Topic category: Advanced modding

Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to check if mob is a boss or not

what is the code required to check if the target entity is a boss mob? I already figured out the IsNonBoss part but I'm stuck on actually utilising it. please help me I'm making a custom enchantment that does extra damage to all bosses and I don't want to manually specify all the bosses in the procedure. that would be a hassle because every time I try to make a new boss I would have to add it to the list.

I tried if (LivingEntity.IsNonBoss = false) {do some damage} but it's not working

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
/** * Returns false if…
Tue, 07/07/2020 - 00:00
   /**
    * Returns false if this Entity is a boss, true otherwise.
    */
   public boolean isNonBoss() {
      return false;
   }

So that should work, have you done any prints etc.
And can post code so I can test?

Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I figured out that part, but…
Tue, 07/07/2020 - 00:11

I figured out that part, but I'm making an enchantment that checks if the provided entity is a boss. That part is already defined in the mob maker.