How can i make a mob, that when hurt it will make all hostile mobs around, target the player who hits him

Started by GabriBerp on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can i make a mob, that when hurt it will make all hostile mobs around, target the player who hits him

So, recently during my project, I found a problem, I'm currently developing a mob for the end, that works like a child, it would be a passive mob that when attacked, would go into cry mode, where in this mode, all the endermans near it, would become aggressive to the player, without needing the player to look them in the eye, but I've searched the entire internet, and found no place teaching how to do this, and I have no notion of where to start, so I wanted to know first if it would be possible to do such a mechanic?

(Sorry if there are any grammatical errors, I am not very good at English when it comes to writing, I only know basic things because of the programming languages)

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Have you learned it?
Sat, 09/14/2024 - 16:50

Have you learned it?

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So on baby hit by entity…
Mon, 09/16/2024 - 15:33

So on baby hit by entity. Entity iterator at x y z in cube size (whatever) 10, then if entity iterator = type enderman, set attack target of entity iterator to source entity. Thats it I think.