Barakoaya healing AI is broken when on a team with Mob Battle Mod
Chumbanotz opened this issue ยท 2 comments
With the Mob Battle Mod installed, Barakoaya that are on a team cannot properly target Barako when other mobs or players on a different team are within targeting range. They continually stop and start healing the Barako and try to heal mobs on the other team.
Minecraft_.1.16.5.-.Singleplayer.2022-06-28.17-38-09.mp4
Mob Battle Mod adds a goal to every mob on a team that will make them target other mobs not on the same team, and removes all other goals from the mob's targetSelector
. I think the problem is Barakoaya use the method MobEntity#getAttackTarget
for its healing target, which is being changed by this goal. Other mods could potentially break the Barakoaya's AI as well by adding a goal to the targetSelector
.
One way this could be fixed is to override MobEntity#setAttackTarget
for Barakoaya and only allow a target to be set that it is allowed to heal.
Hm, but it would still remove its other target tasks.
How does the Mob Battle Mod handle witches in raids? They also use attack targets to decide who to heal.
The witches won't heal the other raiders. I guess one way around this would be to add the Barakoaya's target goals to the goalSelector
instead of the targetSelector
, which should work, but that seems counterintuitive. Perhaps I should open an issue with the Mob Battle Mod github and see if the targetSelector
really needs to be cleared.