Started by
knowburro
on
Topic category: Help with Minecraft modding (Java Edition)
I want to create a boss entity that spawns two minions to assist it during combat. These minions should not attack indiscriminately but rather focus on targeting the specific entity that is attacking their boss.
How can I implement this behavior effectively in MCreator, or do I need to modify the entity AI through code? What would be the best approach to ensure the minions correctly prioritize the boss’s attacker?
You can use the "Get entity [] is targeting for attack" entity data block and use it in the "Set the attack target of [] to []" entity action block. One way you could implement this is having the boss mob iterate through nearby minion mobs and set their attack target to its attack target every once in a while.
Another thing that might help (although I'm not sure if it will work or not) is to remove the "Fight attacker mobs back, call for help [] []" block from the AI and goals tab of the minion entity. The idea is that the minions will only attack a target set for them by procedure.