public void h() {
    super.h();
    if (this.world.isStatic && this.datawatcher.a()) {
      this.datawatcher.e();
      this.cP();
    }

    if (this.bE > 0 && ++this.bE > 30) {
      this.bE = 0;
      this.b(128, false);
    }

    if (!this.world.isStatic && this.bF > 0 && ++this.bF > 20) {
      this.bF = 0;
      this.p(false);
    }

    if (this.bp > 0 && ++this.bp > 8) {
      this.bp = 0;
    }

    if (this.bq > 0) {
      ++this.bq;
      if (this.bq > 300) {
        this.bq = 0;
      }
    }

    this.bK = this.bJ;
    if (this.cm()) {
      this.bJ += (1.0F - this.bJ) * 0.4F + 0.05F;
      if (this.bJ > 1.0F) {
        this.bJ = 1.0F;
      }
    } else {
      this.bJ += (0.0F - this.bJ) * 0.4F - 0.05F;
      if (this.bJ < 0.0F) {
        this.bJ = 0.0F;
      }
    }

    this.bM = this.bL;
    if (this.cn()) {
      this.bK = this.bJ = 0.0F;
      this.bL += (1.0F - this.bL) * 0.4F + 0.05F;
      if (this.bL > 1.0F) {
        this.bL = 1.0F;
      }
    } else {
      this.bI = false;
      this.bL += (0.8F * this.bL * this.bL * this.bL - this.bL) * 0.6F - 0.05F;
      if (this.bL < 0.0F) {
        this.bL = 0.0F;
      }
    }

    this.bO = this.bN;
    if (this.x(128)) {
      this.bN += (1.0F - this.bN) * 0.7F + 0.05F;
      if (this.bN > 1.0F) {
        this.bN = 1.0F;
      }
    } else {
      this.bN += (0.0F - this.bN) * 0.7F - 0.05F;
      if (this.bN < 0.0F) {
        this.bN = 0.0F;
      }
    }
  }
Exemple #2
0
 protected void h() {
   super.h();
   this.datawatcher.a(16, Byte.valueOf((byte) 0));
 }