public boolean a() {
    if (this.a.world.r()) {
      return false;
    } else {
      Village village =
          this.a.world.villages.getClosestVillage(
              MathHelper.floor(this.a.locX),
              MathHelper.floor(this.a.locY),
              MathHelper.floor(this.a.locZ),
              16);

      if (village == null) {
        return false;
      } else {
        this.b =
            village.b(
                MathHelper.floor(this.a.locX),
                MathHelper.floor(this.a.locY),
                MathHelper.floor(this.a.locZ));
        return this.b == null
            ? false
            : (double)
                    this.b.c(
                        MathHelper.floor(this.a.locX),
                        MathHelper.floor(this.a.locY),
                        MathHelper.floor(this.a.locZ))
                < 2.25D;
      }
    }
  }
  public boolean a() {
    if (this.a.world.w()) {
      return false;
    } else {
      BlockPosition blockposition = new BlockPosition(this.a);
      Village village = this.a.world.ae().getClosestVillage(blockposition, 16);

      if (village == null) {
        return false;
      } else {
        this.b = village.b(blockposition);
        return this.b == null ? false : (double) this.b.b(blockposition) < 2.25D;
      }
    }
  }