Exemple #1
0
  public void func_78447_b(float p_78447_1_) {
    GL11.glDisable(3008);
    int var2;
    if (this.field_78455_a.field_71439_g.func_70027_ad()) {
      var2 = this.field_78455_a.field_71446_o.func_78341_b("/terrain.png");
      GL11.glBindTexture(3553, var2);
      this.func_78442_d(p_78447_1_);
    }

    if (this.field_78455_a.field_71439_g.func_70094_T()) {
      var2 = MathHelper.func_76128_c(this.field_78455_a.field_71439_g.field_70165_t);
      int var3 = MathHelper.func_76128_c(this.field_78455_a.field_71439_g.field_70163_u);
      int var4 = MathHelper.func_76128_c(this.field_78455_a.field_71439_g.field_70161_v);
      int var5 = this.field_78455_a.field_71446_o.func_78341_b("/terrain.png");
      GL11.glBindTexture(3553, var5);
      int var6 = this.field_78455_a.field_71441_e.func_72798_a(var2, var3, var4);
      if (this.field_78455_a.field_71441_e.func_72809_s(var2, var3, var4)) {
        this.func_78446_a(p_78447_1_, Block.field_71973_m[var6].func_71851_a(2));
      } else {
        for (int var7 = 0; var7 < 8; ++var7) {
          float var8 =
              ((float) ((var7 >> 0) % 2) - 0.5F)
                  * this.field_78455_a.field_71439_g.field_70130_N
                  * 0.9F;
          float var9 =
              ((float) ((var7 >> 1) % 2) - 0.5F)
                  * this.field_78455_a.field_71439_g.field_70131_O
                  * 0.2F;
          float var10 =
              ((float) ((var7 >> 2) % 2) - 0.5F)
                  * this.field_78455_a.field_71439_g.field_70130_N
                  * 0.9F;
          int var11 = MathHelper.func_76141_d((float) var2 + var8);
          int var12 = MathHelper.func_76141_d((float) var3 + var9);
          int var13 = MathHelper.func_76141_d((float) var4 + var10);
          if (this.field_78455_a.field_71441_e.func_72809_s(var11, var12, var13)) {
            var6 = this.field_78455_a.field_71441_e.func_72798_a(var11, var12, var13);
          }
        }
      }

      if (Block.field_71973_m[var6] != null) {
        this.func_78446_a(p_78447_1_, Block.field_71973_m[var6].func_71851_a(2));
      }
    }

    if (this.field_78455_a.field_71439_g.func_70055_a(Material.field_76244_g)) {
      var2 = this.field_78455_a.field_71446_o.func_78341_b("/misc/water.png");
      GL11.glBindTexture(3553, var2);
      this.func_78448_c(p_78447_1_);
    }

    GL11.glEnable(3008);
  }
  private PathEntity func_75857_a(
      Entity p_75857_1_,
      double p_75857_2_,
      double p_75857_4_,
      double p_75857_6_,
      float p_75857_8_) {
    this.field_75866_b.func_75848_a();
    this.field_75867_c.func_76046_c();
    boolean var9 = this.field_75863_g;
    int var10 = MathHelper.func_76128_c(p_75857_1_.field_70121_D.field_72338_b + 0.5D);
    if (this.field_75869_h && p_75857_1_.func_70090_H()) {
      var10 = (int) p_75857_1_.field_70121_D.field_72338_b;

      for (int var11 =
              this.field_75868_a.func_72798_a(
                  MathHelper.func_76128_c(p_75857_1_.field_70165_t),
                  var10,
                  MathHelper.func_76128_c(p_75857_1_.field_70161_v));
          var11 == Block.field_71942_A.field_71990_ca
              || var11 == Block.field_71943_B.field_71990_ca;
          var11 =
              this.field_75868_a.func_72798_a(
                  MathHelper.func_76128_c(p_75857_1_.field_70165_t),
                  var10,
                  MathHelper.func_76128_c(p_75857_1_.field_70161_v))) {
        ++var10;
      }

      var9 = this.field_75863_g;
      this.field_75863_g = false;
    } else {
      var10 = MathHelper.func_76128_c(p_75857_1_.field_70121_D.field_72338_b + 0.5D);
    }

    PathPoint var15 =
        this.func_75854_a(
            MathHelper.func_76128_c(p_75857_1_.field_70121_D.field_72340_a),
            var10,
            MathHelper.func_76128_c(p_75857_1_.field_70121_D.field_72339_c));
    PathPoint var12 =
        this.func_75854_a(
            MathHelper.func_76128_c(p_75857_2_ - (double) (p_75857_1_.field_70130_N / 2.0F)),
            MathHelper.func_76128_c(p_75857_4_),
            MathHelper.func_76128_c(p_75857_6_ - (double) (p_75857_1_.field_70130_N / 2.0F)));
    PathPoint var13 =
        new PathPoint(
            MathHelper.func_76141_d(p_75857_1_.field_70130_N + 1.0F),
            MathHelper.func_76141_d(p_75857_1_.field_70131_O + 1.0F),
            MathHelper.func_76141_d(p_75857_1_.field_70130_N + 1.0F));
    PathEntity var14 = this.func_75861_a(p_75857_1_, var15, var12, var13, p_75857_8_);
    this.field_75863_g = var9;
    return var14;
  }
  public void func_78447_b(float p_78447_1_) {
    GL11.glDisable(3008);
    if (this.field_78455_a.field_71439_g.func_70027_ad()) {
      this.func_78442_d(p_78447_1_);
    }

    if (this.field_78455_a.field_71439_g.func_70094_T()) {
      int var2 = MathHelper.func_76128_c(this.field_78455_a.field_71439_g.field_70165_t);
      int var3 = MathHelper.func_76128_c(this.field_78455_a.field_71439_g.field_70163_u);
      int var4 = MathHelper.func_76128_c(this.field_78455_a.field_71439_g.field_70161_v);
      int var5 = this.field_78455_a.field_71441_e.func_72798_a(var2, var3, var4);
      if (this.field_78455_a.field_71441_e.func_72809_s(var2, var3, var4)) {
        this.func_78446_a(p_78447_1_, Block.field_71973_m[var5].func_71851_a(2));
      } else {
        for (int var6 = 0; var6 < 8; ++var6) {
          float var7 =
              ((float) ((var6 >> 0) % 2) - 0.5F)
                  * this.field_78455_a.field_71439_g.field_70130_N
                  * 0.9F;
          float var8 =
              ((float) ((var6 >> 1) % 2) - 0.5F)
                  * this.field_78455_a.field_71439_g.field_70131_O
                  * 0.2F;
          float var9 =
              ((float) ((var6 >> 2) % 2) - 0.5F)
                  * this.field_78455_a.field_71439_g.field_70130_N
                  * 0.9F;
          int var10 = MathHelper.func_76141_d((float) var2 + var7);
          int var11 = MathHelper.func_76141_d((float) var3 + var8);
          int var12 = MathHelper.func_76141_d((float) var4 + var9);
          if (this.field_78455_a.field_71441_e.func_72809_s(var10, var11, var12)) {
            var5 = this.field_78455_a.field_71441_e.func_72798_a(var10, var11, var12);
          }
        }
      }

      if (Block.field_71973_m[var5] != null) {
        this.func_78446_a(p_78447_1_, Block.field_71973_m[var5].func_71851_a(2));
      }
    }

    if (this.field_78455_a.field_71439_g.func_70055_a(Material.field_76244_g)) {
      this.func_78448_c(p_78447_1_);
    }

    GL11.glEnable(3008);
  }
  protected void func_75208_c(ItemStack p_75208_1_) {
    p_75208_1_.func_77980_a(
        this.field_75229_a.field_70170_p, this.field_75229_a, this.field_75228_b);
    if (!this.field_75229_a.field_70170_p.field_72995_K) {
      int var2 = this.field_75228_b;
      float var3 = FurnaceRecipes.func_77602_a().func_77601_c(p_75208_1_.field_77993_c);
      int var4;
      if (var3 == 0.0F) {
        var2 = 0;
      } else if (var3 < 1.0F) {
        var4 = MathHelper.func_76141_d((float) var2 * var3);
        if (var4 < MathHelper.func_76123_f((float) var2 * var3)
            && (float) Math.random() < (float) var2 * var3 - (float) var4) {
          ++var4;
        }

        var2 = var4;
      }

      while (var2 > 0) {
        var4 = EntityXPOrb.func_70527_a(var2);
        var2 -= var4;
        this.field_75229_a.field_70170_p.func_72838_d(
            new EntityXPOrb(
                this.field_75229_a.field_70170_p,
                this.field_75229_a.field_70165_t,
                this.field_75229_a.field_70163_u + 0.5D,
                this.field_75229_a.field_70161_v + 0.5D,
                var4));
      }
    }

    this.field_75228_b = 0;
    if (p_75208_1_.field_77993_c == Item.field_77703_o.field_77779_bT) {
      this.field_75229_a.func_71064_a(AchievementList.field_76016_k, 1);
    }

    if (p_75208_1_.field_77993_c == Item.field_77753_aV.field_77779_bT) {
      this.field_75229_a.func_71064_a(AchievementList.field_76026_p, 1);
    }
  }