Requesting that you fire LivingSetAttackTargetEvent when setting targets for Chaos Dragon
whizzball1 opened this issue ยท 1 comments
Hello!
I am writing a mod called Apathetic Mobs which causes mobs to ignore peaceful players. This is so that peaceful players can properly interact with modpacks which require mob drops, despite whatever fear or annoyance comes to them from mobs.
However, your mod sets its attack targets without using the Forge system, and so I cannot detect when the Chaos Guardian decides to set a target. You could easily hook into the event bus by calling net.minecraftforge.common.ForgeHooks.onLivingSetAttackTarget(targetter, target);
whenever you set your target.
There are several places in your code where you set your target just by using target = entity
. I will try to locate all of these and inform you where, if you are willing, you should push this event. (Or you can always set target through a function and just stick the hook there.)
Thank you for concerning yourself with the peaceful community!
Line 475, 604 (refers to setNewTarget()), 666, 702, 802 (setNewTarget() (also, can you please make this public or provide a public method whereby I can change the target? Or just override the basic EntityLivingBase method setAttackTarget() and allow me to use that?), and 849.