How do you make a Mob that attaks only if its attaked, like zombie pigman?

Started by AlanBur on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do you make a Mob that attaks only if its attaked, like zombie pigman?
Sun, 07/28/2019 - 22:02 (edited)

Hello!, i cant find the way to make my mob attack when its attacked, i made a mob wich is a Skeleton SheepMan who lives in the hell but it attacks like a skeleton and i dont want that, i just want it to be passive until it gets attacked, do someone know how do i do that? (im new) :)

 

My mob <3

 

Edited by AlanBur on Sun, 07/28/2019 - 22:02
Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That's pretty easy. Just add…
Wed, 07/31/2019 - 15:25

That's pretty easy. Just add the "Make Mob Aggressive" AI Block and remove the "Attack [properties] type of EntityPlayer/EntityPlayerMP" AI Block. That'll make the Mob attack only it's Damage source. If the mob isn't hit by any entity, it'll have no damage source and because of that, it won't react. 

Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can also just look in…
Fri, 09/10/2021 - 15:09

You can also just look in the AI templates and click "Mob that attacks only when hurt" template.