public boolean continueExecuting()
    {
        EntityLiving var1 = this.taskOwner.getAttackTarget();

        if (var1 == null)
        {
            return false;
        }
        else if (!var1.isEntityAlive())
        {
            return false;
        }
        else if (this.taskOwner.getDistanceSqToEntity(var1) > (double)(this.targetDistance * this.targetDistance))
        {
            return false;
        }
        else
        {
            if (this.field_48380_e)
            {
                if (!this.taskOwner.getEntitySenses().canSee(var1))
                {
                    if (++this.field_48378_g > 60)
                    {
                        return false;
                    }
                }
                else
                {
                    this.field_48378_g = 0;
                }
            }

            return true;
        }
    }