how to check if mob is a boss or not

Started by tntapplecraft YT on

Topic category: Advanced modding

Active 3 years ago
Joined Feb 2018
Points:
819

User statistics:

  • Modifications: 2
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 136
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

Active 4 years ago
Joined Sep 2019
Points:
973

User statistics:

  • Modifications: 1
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 507
/** * 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?

Active 3 years ago
Joined Feb 2018
Points:
819

User statistics:

  • Modifications: 2
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 136
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.