public boolean b() {
    EntityLiving entityliving = this.b.getGoalTarget();

    return entityliving == null
        ? false
        : (!entityliving.isAlive()
            ? false
            : (!this.e
                ? !this.b.getNavigation().g()
                : this.b.b(
                    MathHelper.floor(entityliving.locX),
                    MathHelper.floor(entityliving.locY),
                    MathHelper.floor(entityliving.locZ))));
  }
  public boolean a() {
    EntityLiving entityliving = this.b.getGoalTarget();

    if (entityliving == null) {
      return false;
    } else if (!entityliving.isAlive()) {
      return false;
    } else if (this.g != null && !this.g.isAssignableFrom(entityliving.getClass())) {
      return false;
    } else {
      this.f = this.b.getNavigation().a(entityliving);
      return this.f != null;
    }
  }
Example #3
0
 @Override
 public boolean shouldFinish() {
   if (entityMyPet.getTarget() == null
       || !target.isAlive()
       || myPet.getRangedDamage() <= 0
       || !entityMyPet.canMove()) {
     return true;
   }
   if (this.target.getBukkitEntity() != this.myPet.getEntity().getTarget()) {
     return true;
   }
   double meleeDamage = myPet.getDamage();
   if (meleeDamage > 0
       && this.entityMyPet.f(target.locX, target.getBoundingBox().b, target.locZ) < 4) {
     if (meleeDamage > rangedSkill.getDamage()) {
       return true;
     }
   }
   return false;
 }