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)

Active 4 years ago
Joined Jul 2019
Points:
663

User statistics:

  • Modifications: 1
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 7
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
Active 1 week ago
Joined Dec 2016
Points:
760

User statistics:

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

Active 2 years ago
Joined Apr 2019
Points:
660

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 11
thanks!
Tue, 10/06/2020 - 09:57

thanks!

Active 3 years ago
Joined Sep 2021
Points:
484

User statistics:

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