Mobs Immune to Arrows

Upvotes: 4
Issue description

A feature to make mobs immune to arrows, it make arrows bounce on them, like in Wither Phase 2

Here a piece of code someone from Unofficial MCreator Discord provided

public boolean attackEntityFrom(DamageSource source, float amount)
    Entity entity = source.getImmediateSource();
    if (entity instanceof EntityArrow)
        return false;
        return super.attackEntityFrom(source, amount);


Issue comments

Submitted by Klemen on Sun, 06/09/2019 - 18:14

Thanks for the code, we will consider adding this.

This would be so useful for melee bosses!

Yeah, i will so that to all my bosses

Oh wait, Is this possible to immune mobs from sword? or hits with hand

Submitted by Klemen on Sat, 06/22/2019 - 18:20

MCreator 1.9.0 will add the option to make mob immune to the following new sources (each one can be enabled or disabled):

  • arrows
  • potions
  • direct player attack (hand, sword)
  • fall damage
  • cactus
  • drowning
  • lightning bolts

I am closing this ticket now.

This means we will be able to make more complex and unique mobs! :D