public void updateTask() { if (entityAnkylosaur.getAnimTick() < 14) entityAnkylosaur.getLookHelper().setLookPositionWithEntity(attackTarget, 30F, 30F); if (entityAnkylosaur.getAnimTick() == 14 && attackTarget != null) attackTarget.attackEntityFrom(DamageSource.causeMobDamage(entityAnkylosaur), 1); }
public void startExecuting() { super.startExecuting(); attackTarget = (EntityLiving) entityAnkylosaur.getAttackTarget(); }