Feature of fighting back to players
Ch3225 opened this issue ยท 4 comments
I want the guard villager won't fight back when players attacking them, because sometimes player might do it by mistake. But i think they should still fight players that have very low reputation(like -100).
Now it seems that any cases if a player attacks a guard villager it will fight back.
The Friendly Fire mod would be able to mitigate this:
https://www.curseforge.com/minecraft/mc-mods/friendly-fire
I tried that mod.
It could solve some problem though but would introduce some other problems:
I want not attack back but not immune damage; also
There are 3 modes in that mod: bypass_all, bypass_pet, general_protection.
the last one just immune all the combat damages which just made guards invincible from all damage sources including zombies and skeletons or illagers, bypass_all and bypass_pet did nothing at all.
and of course there is nothing default in that mod related to guard.
What I want is disabling the fight-back mechanic for the guard when opponent is a player.
I've taken a look at your code.
If you agree this could be a improvement and want to make this done, I think we can made it by just modifying the [onEntityHurt] method in [HandlerEvents.java].
The Friendly Fire mod would be able to mitigate this: https://www.curseforge.com/minecraft/mc-mods/friendly-fire