Just one other thing, not really related but how would I make this if statement only run once because at the moment the sound is continuously played until the entity no longer has an attack target.
if (this.getAttackTarget() != null)
{
this.playSound("mob.zombiepig.zpigangry");
Hello!
I created an entity that attacks the player like any other monster. However I set it's movement speed to a low number as it is slow when it walks. I want it's movement speed to increase when the player (not on creative) comes in range of the mob similar to a ZombiePigMan however doesn't only happen after its hit. How would I do this?