Mob AI: Attack EntityMob

Published by Aecht_Rob on
Status
Works as designed
Issue description

When defining custom entity AI (MC 1.12.2), using the Attack AI and choosing to attack "EntityMob" I have two issues:

 

1) The entity will attack others of its kind, which is pretty annoying. Some kind of "do not attack" dropdown is needed in this too, so we can blacklist some other mobs it is not going to attack (including itself).

2) The entity doesn't seem to attack ALL mobs from other mods. It only attacks some of them. Eg. it will attack the Anu boss from Fossils and Archeology, but will not attack Dinosaurs from that mod. It won't touch vanilla cows, but will attack vanilla zombies. Is the definition of a "mob" wrong? It seems to only involve hostile ones. How can we get it to attack passive mobs too? At the moment, I have also told it to attack animals and ageables, as a compromise. Or is that deliberate?

Issue comments

Setting your mob to attack EntityMob will only attach all mobs that extend EntityMob. This is most vanilla aggressive entities.

If mods do not extend EntityMob, there is no other way to identify that their mod is intended to be aggressive.

To attack animals, add EntityAnimal, but the same rule applies. If entity is not based on EntityAnimal, it will not be attacked.

Is it possible to create a living entity in MCreator that is nether an EntityMob or an EntityAnimal maybe? (So it would not attack others of its kind).

I have a new entity created with MCreator, "ABC", and it has AI to attack Entitymobs and Entityanimals.

If I have two ABCs in the game, then they attack each other. I don't want them to. Is there some way to have the ABC not defined as a Entitymob or an Entityanimal, so that ABCs wont attack other ABCs?

If you set it to creature, it will not be mob or animal.

But the best would be to specifically specify which mobs to attack, not just mob types.

Unfortunately I need it to pick up several hundred potential mobs from many mods, which MCreator won't allow me to do, so I need to use this more generic approach.