Started by
RoAmbros
on
Topic category: Help with Minecraft modding (Java Edition)
I created a custom mob that I wanted to attack Monsters but it started attacking other custom mobs that were supposed to be its ally. I was finally able to implement a fix after piecing it together from other forum posts.
Basically, I put a custom item into the custom mobs' armor slots (head for this example) and then had it check for that item in that slot. If it found the item, it prevented the attack. If the item was missing, it proceeded to attack.
This example is of a stationary mob that only does ranged attacks (i.e. a turret).
I did something like that, and although my custom mobs don't run towards each other anymore, they still occasionally harm each other. What should I do? (2023.3)
In other words, they don't ignore each other entirely.