Iron Golems Break Neutral Mobs
IndieanaJones opened this issue ยท 1 comments
The issue is that Iron Golem morphs run this.entity.attackEntityAsMob(target); to get the arm swing, which essentially makes the morph do the attack that goes through. This makes neutral mobs target the entity used for the morph (in this case, the Iron Golem) instead of the player, meaning they'll follow you around and attempt to attack a morph they cannot harm. Two solutions I forsee:
-
Remove the code from the Iron Golem which makes it perform the attack, since currently the knockback and the golem's hit both stack on each other, sending the target super high. This will, however, remove the arm swing animation and the extra damage currently given by the golem
-
Somehow transfer the aggro from the morph to the player.
I've actually written up the I.G's morph attack into an attack type, allowing other mobs to use their unique attacks (would basically remove the need for most attack types currently implemented, and allow for things like zombies infecting villagers or burning targets), so having some way to do the second solution would be great. I'm just running into the issue of detecting if a mob is somebody's morph or not, since it seems like there's no easy way of currently doing this.