Ejemplo n.º 1
0
  private void func_70950_c(int p_70950_1_) {
    if (this.field_70963_i != null) {
      this.field_82191_bN = MathHelper.func_76129_c((float) this.field_70963_i.size()) * 0.2F;
    } else {
      this.field_82191_bN = 0.0F;
    }

    MerchantRecipeList var2;
    var2 = new MerchantRecipeList();
    int var6;
    label50:
    switch (this.func_70946_n()) {
      case 0:
        func_146091_a(var2, Items.field_151015_O, this.field_70146_Z, this.func_82188_j(0.9F));
        func_146091_a(
            var2,
            Item.func_150898_a(Blocks.field_150325_L),
            this.field_70146_Z,
            this.func_82188_j(0.5F));
        func_146091_a(var2, Items.field_151076_bf, this.field_70146_Z, this.func_82188_j(0.5F));
        func_146091_a(var2, Items.field_151101_aQ, this.field_70146_Z, this.func_82188_j(0.4F));
        func_146089_b(var2, Items.field_151025_P, this.field_70146_Z, this.func_82188_j(0.9F));
        func_146089_b(var2, Items.field_151127_ba, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151034_e, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151106_aX, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151097_aZ, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151033_d, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151077_bg, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151032_g, this.field_70146_Z, this.func_82188_j(0.5F));
        if (this.field_70146_Z.nextFloat() < this.func_82188_j(0.5F)) {
          var2.add(
              new MerchantRecipe(
                  new ItemStack(Blocks.field_150351_n, 10),
                  new ItemStack(Items.field_151166_bC),
                  new ItemStack(Items.field_151145_ak, 4 + this.field_70146_Z.nextInt(2), 0)));
        }
        break;
      case 1:
        func_146091_a(var2, Items.field_151121_aF, this.field_70146_Z, this.func_82188_j(0.8F));
        func_146091_a(var2, Items.field_151122_aG, this.field_70146_Z, this.func_82188_j(0.8F));
        func_146091_a(var2, Items.field_151164_bB, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(
            var2,
            Item.func_150898_a(Blocks.field_150342_X),
            this.field_70146_Z,
            this.func_82188_j(0.8F));
        func_146089_b(
            var2,
            Item.func_150898_a(Blocks.field_150359_w),
            this.field_70146_Z,
            this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151111_aL, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151113_aN, this.field_70146_Z, this.func_82188_j(0.2F));
        if (this.field_70146_Z.nextFloat() < this.func_82188_j(0.07F)) {
          Enchantment var8 =
              Enchantment.field_92090_c[
                  this.field_70146_Z.nextInt(Enchantment.field_92090_c.length)];
          int var10 =
              MathHelper.func_76136_a(this.field_70146_Z, var8.func_77319_d(), var8.func_77325_b());
          ItemStack var11 = Items.field_151134_bR.func_92111_a(new EnchantmentData(var8, var10));
          var6 = 2 + this.field_70146_Z.nextInt(5 + var10 * 10) + 3 * var10;
          var2.add(
              new MerchantRecipe(
                  new ItemStack(Items.field_151122_aG),
                  new ItemStack(Items.field_151166_bC, var6),
                  var11));
        }
        break;
      case 2:
        func_146089_b(var2, Items.field_151061_bv, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151062_by, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151137_ax, this.field_70146_Z, this.func_82188_j(0.4F));
        func_146089_b(
            var2,
            Item.func_150898_a(Blocks.field_150426_aN),
            this.field_70146_Z,
            this.func_82188_j(0.3F));
        Item[] var3 =
            new Item[] {
              Items.field_151040_l,
              Items.field_151048_u,
              Items.field_151030_Z,
              Items.field_151163_ad,
              Items.field_151036_c,
              Items.field_151056_x,
              Items.field_151035_b,
              Items.field_151046_w
            };
        Item[] var4 = var3;
        int var5 = var3.length;
        var6 = 0;

        while (true) {
          if (var6 >= var5) {
            break label50;
          }

          Item var7 = var4[var6];
          if (this.field_70146_Z.nextFloat() < this.func_82188_j(0.05F)) {
            var2.add(
                new MerchantRecipe(
                    new ItemStack(var7, 1, 0),
                    new ItemStack(Items.field_151166_bC, 2 + this.field_70146_Z.nextInt(3), 0),
                    EnchantmentHelper.func_77504_a(
                        this.field_70146_Z,
                        new ItemStack(var7, 1, 0),
                        5 + this.field_70146_Z.nextInt(15))));
          }

          ++var6;
        }
      case 3:
        func_146091_a(var2, Items.field_151044_h, this.field_70146_Z, this.func_82188_j(0.7F));
        func_146091_a(var2, Items.field_151042_j, this.field_70146_Z, this.func_82188_j(0.5F));
        func_146091_a(var2, Items.field_151043_k, this.field_70146_Z, this.func_82188_j(0.5F));
        func_146091_a(var2, Items.field_151045_i, this.field_70146_Z, this.func_82188_j(0.5F));
        func_146089_b(var2, Items.field_151040_l, this.field_70146_Z, this.func_82188_j(0.5F));
        func_146089_b(var2, Items.field_151048_u, this.field_70146_Z, this.func_82188_j(0.5F));
        func_146089_b(var2, Items.field_151036_c, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151056_x, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151035_b, this.field_70146_Z, this.func_82188_j(0.5F));
        func_146089_b(var2, Items.field_151046_w, this.field_70146_Z, this.func_82188_j(0.5F));
        func_146089_b(var2, Items.field_151037_a, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151047_v, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151019_K, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151012_L, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151167_ab, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151175_af, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151028_Y, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151161_ac, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151030_Z, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151163_ad, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151165_aa, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151173_ae, this.field_70146_Z, this.func_82188_j(0.2F));
        func_146089_b(var2, Items.field_151029_X, this.field_70146_Z, this.func_82188_j(0.1F));
        func_146089_b(var2, Items.field_151020_U, this.field_70146_Z, this.func_82188_j(0.1F));
        func_146089_b(var2, Items.field_151023_V, this.field_70146_Z, this.func_82188_j(0.1F));
        func_146089_b(var2, Items.field_151022_W, this.field_70146_Z, this.func_82188_j(0.1F));
        break;
      case 4:
        func_146091_a(var2, Items.field_151044_h, this.field_70146_Z, this.func_82188_j(0.7F));
        func_146091_a(var2, Items.field_151147_al, this.field_70146_Z, this.func_82188_j(0.5F));
        func_146091_a(var2, Items.field_151082_bd, this.field_70146_Z, this.func_82188_j(0.5F));
        func_146089_b(var2, Items.field_151141_av, this.field_70146_Z, this.func_82188_j(0.1F));
        func_146089_b(var2, Items.field_151027_R, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151021_T, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151024_Q, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151026_S, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151157_am, this.field_70146_Z, this.func_82188_j(0.3F));
        func_146089_b(var2, Items.field_151083_be, this.field_70146_Z, this.func_82188_j(0.3F));
    }

    if (var2.isEmpty()) {
      func_146091_a(var2, Items.field_151043_k, this.field_70146_Z, 1.0F);
    }

    Collections.shuffle(var2);
    if (this.field_70963_i == null) {
      this.field_70963_i = new MerchantRecipeList();
    }

    for (int var9 = 0; var9 < p_70950_1_ && var9 < var2.size(); ++var9) {
      this.field_70963_i.func_77205_a((MerchantRecipe) var2.get(var9));
    }
  }
Ejemplo n.º 2
0
  public void func_78440_a(float p_78440_1_) {
    float var2 = this.field_78451_d + (this.field_78454_c - this.field_78451_d) * p_78440_1_;
    EntityClientPlayerMP var3 = this.field_78455_a.field_71439_g;
    float var4 = var3.field_70127_C + (var3.field_70125_A - var3.field_70127_C) * p_78440_1_;
    GL11.glPushMatrix();
    GL11.glRotatef(var4, 1.0F, 0.0F, 0.0F);
    GL11.glRotatef(
        var3.field_70126_B + (var3.field_70177_z - var3.field_70126_B) * p_78440_1_,
        0.0F,
        1.0F,
        0.0F);
    RenderHelper.func_74519_b();
    GL11.glPopMatrix();
    float var6;
    float var7;
    if (var3 instanceof EntityPlayerSP) {
      EntityPlayerSP var5 = (EntityPlayerSP) var3;
      var6 = var5.field_71164_i + (var5.field_71155_g - var5.field_71164_i) * p_78440_1_;
      var7 = var5.field_71163_h + (var5.field_71154_f - var5.field_71163_h) * p_78440_1_;
      GL11.glRotatef((var3.field_70125_A - var6) * 0.1F, 1.0F, 0.0F, 0.0F);
      GL11.glRotatef((var3.field_70177_z - var7) * 0.1F, 0.0F, 1.0F, 0.0F);
    }

    ItemStack var17 = this.field_78453_b;
    var6 =
        this.field_78455_a.field_71441_e.func_72801_o(
            MathHelper.func_76128_c(var3.field_70165_t),
            MathHelper.func_76128_c(var3.field_70163_u),
            MathHelper.func_76128_c(var3.field_70161_v));
    var6 = 1.0F;
    int var18 =
        this.field_78455_a.field_71441_e.func_72802_i(
            MathHelper.func_76128_c(var3.field_70165_t),
            MathHelper.func_76128_c(var3.field_70163_u),
            MathHelper.func_76128_c(var3.field_70161_v),
            0);
    int var8 = var18 % 65536;
    int var9 = var18 / 65536;
    OpenGlHelper.func_77475_a(OpenGlHelper.field_77476_b, (float) var8 / 1.0F, (float) var9 / 1.0F);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    float var10;
    float var21;
    float var20;
    if (var17 != null) {
      var18 = Item.field_77698_e[var17.field_77993_c].func_82790_a(var17, 0);
      var20 = (float) (var18 >> 16 & 255) / 255.0F;
      var21 = (float) (var18 >> 8 & 255) / 255.0F;
      var10 = (float) (var18 & 255) / 255.0F;
      GL11.glColor4f(var6 * var20, var6 * var21, var6 * var10, 1.0F);
    } else {
      GL11.glColor4f(var6, var6, var6, 1.0F);
    }

    float var11;
    float var12;
    float var13;
    Render var24;
    RenderPlayer var26;
    if (var17 != null && var17.field_77993_c == Item.field_77744_bd.field_77779_bT) {
      GL11.glPushMatrix();
      var7 = 0.8F;
      var20 = var3.func_70678_g(p_78440_1_);
      var21 = MathHelper.func_76126_a(var20 * 3.1415927F);
      var10 = MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F);
      GL11.glTranslatef(
          -var10 * 0.4F,
          MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F * 2.0F) * 0.2F,
          -var21 * 0.2F);
      var20 = 1.0F - var4 / 45.0F + 0.1F;
      if (var20 < 0.0F) {
        var20 = 0.0F;
      }

      if (var20 > 1.0F) {
        var20 = 1.0F;
      }

      var20 = -MathHelper.func_76134_b(var20 * 3.1415927F) * 0.5F + 0.5F;
      GL11.glTranslatef(
          0.0F, 0.0F * var7 - (1.0F - var2) * 1.2F - var20 * 0.5F + 0.04F, -0.9F * var7);
      GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(var20 * -85.0F, 0.0F, 0.0F, 1.0F);
      GL11.glEnable('\u803a');
      GL11.glBindTexture(
          3553,
          this.field_78455_a.field_71446_o.func_78350_a(
              this.field_78455_a.field_71439_g.field_70120_cr,
              this.field_78455_a.field_71439_g.func_70073_O()));

      for (var9 = 0; var9 < 2; ++var9) {
        int var22 = var9 * 2 - 1;
        GL11.glPushMatrix();
        GL11.glTranslatef(-0.0F, -0.6F, 1.1F * (float) var22);
        GL11.glRotatef((float) (-45 * var22), 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(-90.0F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(59.0F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef((float) (-65 * var22), 0.0F, 1.0F, 0.0F);
        var24 = RenderManager.field_78727_a.func_78713_a(this.field_78455_a.field_71439_g);
        var26 = (RenderPlayer) var24;
        var13 = 1.0F;
        GL11.glScalef(var13, var13, var13);
        var26.func_82441_a(this.field_78455_a.field_71439_g);
        GL11.glPopMatrix();
      }

      var21 = var3.func_70678_g(p_78440_1_);
      var10 = MathHelper.func_76126_a(var21 * var21 * 3.1415927F);
      var11 = MathHelper.func_76126_a(MathHelper.func_76129_c(var21) * 3.1415927F);
      GL11.glRotatef(-var10 * 20.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(-var11 * 20.0F, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(-var11 * 80.0F, 1.0F, 0.0F, 0.0F);
      var12 = 0.38F;
      GL11.glScalef(var12, var12, var12);
      GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
      GL11.glTranslatef(-1.0F, -1.0F, 0.0F);
      var13 = 0.015625F;
      GL11.glScalef(var13, var13, var13);
      this.field_78455_a.field_71446_o.func_78342_b(
          this.field_78455_a.field_71446_o.func_78341_b("/misc/mapbg.png"));
      Tessellator var28 = Tessellator.field_78398_a;
      GL11.glNormal3f(0.0F, 0.0F, -1.0F);
      var28.func_78382_b();
      byte var27 = 7;
      var28.func_78374_a((double) (0 - var27), (double) (128 + var27), 0.0D, 0.0D, 1.0D);
      var28.func_78374_a((double) (128 + var27), (double) (128 + var27), 0.0D, 1.0D, 1.0D);
      var28.func_78374_a((double) (128 + var27), (double) (0 - var27), 0.0D, 1.0D, 0.0D);
      var28.func_78374_a((double) (0 - var27), (double) (0 - var27), 0.0D, 0.0D, 0.0D);
      var28.func_78381_a();
      MapData var16 = Item.field_77744_bd.func_77873_a(var17, this.field_78455_a.field_71441_e);
      if (var16 != null) {
        this.field_78449_f.func_78319_a(
            this.field_78455_a.field_71439_g, this.field_78455_a.field_71446_o, var16);
      }

      GL11.glPopMatrix();
    } else if (var17 != null) {
      GL11.glPushMatrix();
      var7 = 0.8F;
      if (var3.func_71052_bv() > 0) {
        EnumAction var19 = var17.func_77975_n();
        if (var19 == EnumAction.eat || var19 == EnumAction.drink) {
          var21 = (float) var3.func_71052_bv() - p_78440_1_ + 1.0F;
          var10 = 1.0F - var21 / (float) var17.func_77988_m();
          var11 = 1.0F - var10;
          var11 = var11 * var11 * var11;
          var11 = var11 * var11 * var11;
          var11 = var11 * var11 * var11;
          var12 = 1.0F - var11;
          GL11.glTranslatef(
              0.0F,
              MathHelper.func_76135_e(MathHelper.func_76134_b(var21 / 4.0F * 3.1415927F) * 0.1F)
                  * (float) ((double) var10 > 0.2D ? 1 : 0),
              0.0F);
          GL11.glTranslatef(var12 * 0.6F, -var12 * 0.5F, 0.0F);
          GL11.glRotatef(var12 * 90.0F, 0.0F, 1.0F, 0.0F);
          GL11.glRotatef(var12 * 10.0F, 1.0F, 0.0F, 0.0F);
          GL11.glRotatef(var12 * 30.0F, 0.0F, 0.0F, 1.0F);
        }
      } else {
        var20 = var3.func_70678_g(p_78440_1_);
        var21 = MathHelper.func_76126_a(var20 * 3.1415927F);
        var10 = MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F);
        GL11.glTranslatef(
            -var10 * 0.4F,
            MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F * 2.0F) * 0.2F,
            -var21 * 0.2F);
      }

      GL11.glTranslatef(0.7F * var7, -0.65F * var7 - (1.0F - var2) * 0.6F, -0.9F * var7);
      GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
      GL11.glEnable('\u803a');
      var20 = var3.func_70678_g(p_78440_1_);
      var21 = MathHelper.func_76126_a(var20 * var20 * 3.1415927F);
      var10 = MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F);
      GL11.glRotatef(-var21 * 20.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(-var10 * 20.0F, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(-var10 * 80.0F, 1.0F, 0.0F, 0.0F);
      var11 = 0.4F;
      GL11.glScalef(var11, var11, var11);
      float var14;
      float var15;
      if (var3.func_71052_bv() > 0) {
        EnumAction var23 = var17.func_77975_n();
        if (var23 == EnumAction.block) {
          GL11.glTranslatef(-0.5F, 0.2F, 0.0F);
          GL11.glRotatef(30.0F, 0.0F, 1.0F, 0.0F);
          GL11.glRotatef(-80.0F, 1.0F, 0.0F, 0.0F);
          GL11.glRotatef(60.0F, 0.0F, 1.0F, 0.0F);
        } else if (var23 == EnumAction.bow) {
          GL11.glRotatef(-18.0F, 0.0F, 0.0F, 1.0F);
          GL11.glRotatef(-12.0F, 0.0F, 1.0F, 0.0F);
          GL11.glRotatef(-8.0F, 1.0F, 0.0F, 0.0F);
          GL11.glTranslatef(-0.9F, 0.2F, 0.0F);
          var13 = (float) var17.func_77988_m() - ((float) var3.func_71052_bv() - p_78440_1_ + 1.0F);
          var14 = var13 / 20.0F;
          var14 = (var14 * var14 + var14 * 2.0F) / 3.0F;
          if (var14 > 1.0F) {
            var14 = 1.0F;
          }

          if (var14 > 0.1F) {
            GL11.glTranslatef(
                0.0F,
                MathHelper.func_76126_a((var13 - 0.1F) * 1.3F) * 0.01F * (var14 - 0.1F),
                0.0F);
          }

          GL11.glTranslatef(0.0F, 0.0F, var14 * 0.1F);
          GL11.glRotatef(-335.0F, 0.0F, 0.0F, 1.0F);
          GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F);
          GL11.glTranslatef(0.0F, 0.5F, 0.0F);
          var15 = 1.0F + var14 * 0.2F;
          GL11.glScalef(1.0F, 1.0F, var15);
          GL11.glTranslatef(0.0F, -0.5F, 0.0F);
          GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F);
          GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F);
        }
      }

      if (var17.func_77973_b().func_77629_n_()) {
        GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
      }

      if (var17.func_77973_b().func_77623_v()) {
        this.func_78443_a(var3, var17, 0);
        int var25 = Item.field_77698_e[var17.field_77993_c].func_82790_a(var17, 1);
        var13 = (float) (var25 >> 16 & 255) / 255.0F;
        var14 = (float) (var25 >> 8 & 255) / 255.0F;
        var15 = (float) (var25 & 255) / 255.0F;
        GL11.glColor4f(var6 * var13, var6 * var14, var6 * var15, 1.0F);
        this.func_78443_a(var3, var17, 1);
      } else {
        this.func_78443_a(var3, var17, 0);
      }

      GL11.glPopMatrix();
    } else if (!var3.func_82150_aj()) {
      GL11.glPushMatrix();
      var7 = 0.8F;
      var20 = var3.func_70678_g(p_78440_1_);
      var21 = MathHelper.func_76126_a(var20 * 3.1415927F);
      var10 = MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F);
      GL11.glTranslatef(
          -var10 * 0.3F,
          MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F * 2.0F) * 0.4F,
          -var21 * 0.4F);
      GL11.glTranslatef(0.8F * var7, -0.75F * var7 - (1.0F - var2) * 0.6F, -0.9F * var7);
      GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
      GL11.glEnable('\u803a');
      var20 = var3.func_70678_g(p_78440_1_);
      var21 = MathHelper.func_76126_a(var20 * var20 * 3.1415927F);
      var10 = MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F);
      GL11.glRotatef(var10 * 70.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(-var21 * 20.0F, 0.0F, 0.0F, 1.0F);
      GL11.glBindTexture(
          3553,
          this.field_78455_a.field_71446_o.func_78350_a(
              this.field_78455_a.field_71439_g.field_70120_cr,
              this.field_78455_a.field_71439_g.func_70073_O()));
      GL11.glTranslatef(-1.0F, 3.6F, 3.5F);
      GL11.glRotatef(120.0F, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(200.0F, 1.0F, 0.0F, 0.0F);
      GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
      GL11.glScalef(1.0F, 1.0F, 1.0F);
      GL11.glTranslatef(5.6F, 0.0F, 0.0F);
      var24 = RenderManager.field_78727_a.func_78713_a(this.field_78455_a.field_71439_g);
      var26 = (RenderPlayer) var24;
      var13 = 1.0F;
      GL11.glScalef(var13, var13, var13);
      var26.func_82441_a(this.field_78455_a.field_71439_g);
      GL11.glPopMatrix();
    }

    GL11.glDisable('\u803a');
    RenderHelper.func_74518_a();
  }
Ejemplo n.º 3
0
  public void func_78440_a(float p_78440_1_) {
    float var2 = this.field_78451_d + (this.field_78454_c - this.field_78451_d) * p_78440_1_;
    EntityClientPlayerMP var3 = this.field_78455_a.field_71439_g;
    float var4 = var3.field_70127_C + (var3.field_70125_A - var3.field_70127_C) * p_78440_1_;
    GL11.glPushMatrix();
    GL11.glRotatef(var4, 1.0F, 0.0F, 0.0F);
    GL11.glRotatef(
        var3.field_70126_B + (var3.field_70177_z - var3.field_70126_B) * p_78440_1_,
        0.0F,
        1.0F,
        0.0F);
    RenderHelper.func_74519_b();
    GL11.glPopMatrix();
    EntityPlayerSP var5 = (EntityPlayerSP) var3;
    float var6 = var5.field_71164_i + (var5.field_71155_g - var5.field_71164_i) * p_78440_1_;
    float var7 = var5.field_71163_h + (var5.field_71154_f - var5.field_71163_h) * p_78440_1_;
    GL11.glRotatef((var3.field_70125_A - var6) * 0.1F, 1.0F, 0.0F, 0.0F);
    GL11.glRotatef((var3.field_70177_z - var7) * 0.1F, 0.0F, 1.0F, 0.0F);
    ItemStack var8 = this.field_78453_b;
    float var9 =
        this.field_78455_a.field_71441_e.func_72801_o(
            MathHelper.func_76128_c(var3.field_70165_t),
            MathHelper.func_76128_c(var3.field_70163_u),
            MathHelper.func_76128_c(var3.field_70161_v));
    var9 = 1.0F;
    int var10 =
        this.field_78455_a.field_71441_e.func_72802_i(
            MathHelper.func_76128_c(var3.field_70165_t),
            MathHelper.func_76128_c(var3.field_70163_u),
            MathHelper.func_76128_c(var3.field_70161_v),
            0);
    int var11 = var10 % 65536;
    int var12 = var10 / 65536;
    OpenGlHelper.func_77475_a(
        OpenGlHelper.field_77476_b, (float) var11 / 1.0F, (float) var12 / 1.0F);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    float var13;
    float var20;
    float var22;
    if (var8 != null) {
      var10 = Item.field_77698_e[var8.field_77993_c].func_82790_a(var8, 0);
      var20 = (float) (var10 >> 16 & 255) / 255.0F;
      var22 = (float) (var10 >> 8 & 255) / 255.0F;
      var13 = (float) (var10 & 255) / 255.0F;
      GL11.glColor4f(var9 * var20, var9 * var22, var9 * var13, 1.0F);
    } else {
      GL11.glColor4f(var9, var9, var9, 1.0F);
    }

    float var14;
    float var15;
    float var16;
    float var21;
    Render var27;
    RenderPlayer var26;
    if (var8 != null && var8.field_77993_c == Item.field_77744_bd.field_77779_bT) {
      GL11.glPushMatrix();
      var21 = 0.8F;
      var20 = var3.func_70678_g(p_78440_1_);
      var22 = MathHelper.func_76126_a(var20 * 3.1415927F);
      var13 = MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F);
      GL11.glTranslatef(
          -var13 * 0.4F,
          MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F * 2.0F) * 0.2F,
          -var22 * 0.2F);
      var20 = 1.0F - var4 / 45.0F + 0.1F;
      if (var20 < 0.0F) {
        var20 = 0.0F;
      }

      if (var20 > 1.0F) {
        var20 = 1.0F;
      }

      var20 = -MathHelper.func_76134_b(var20 * 3.1415927F) * 0.5F + 0.5F;
      GL11.glTranslatef(
          0.0F, 0.0F * var21 - (1.0F - var2) * 1.2F - var20 * 0.5F + 0.04F, -0.9F * var21);
      GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(var20 * -85.0F, 0.0F, 0.0F, 1.0F);
      GL11.glEnable('\u803a');
      this.field_78455_a.func_110434_K().func_110577_a(var3.func_110306_p());

      for (var12 = 0; var12 < 2; ++var12) {
        int var24 = var12 * 2 - 1;
        GL11.glPushMatrix();
        GL11.glTranslatef(-0.0F, -0.6F, 1.1F * (float) var24);
        GL11.glRotatef((float) (-45 * var24), 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(-90.0F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(59.0F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef((float) (-65 * var24), 0.0F, 1.0F, 0.0F);
        var27 = RenderManager.field_78727_a.func_78713_a(this.field_78455_a.field_71439_g);
        var26 = (RenderPlayer) var27;
        var16 = 1.0F;
        GL11.glScalef(var16, var16, var16);
        var26.func_82441_a(this.field_78455_a.field_71439_g);
        GL11.glPopMatrix();
      }

      var22 = var3.func_70678_g(p_78440_1_);
      var13 = MathHelper.func_76126_a(var22 * var22 * 3.1415927F);
      var14 = MathHelper.func_76126_a(MathHelper.func_76129_c(var22) * 3.1415927F);
      GL11.glRotatef(-var13 * 20.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(-var14 * 20.0F, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(-var14 * 80.0F, 1.0F, 0.0F, 0.0F);
      var15 = 0.38F;
      GL11.glScalef(var15, var15, var15);
      GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
      GL11.glTranslatef(-1.0F, -1.0F, 0.0F);
      var16 = 0.015625F;
      GL11.glScalef(var16, var16, var16);
      this.field_78455_a.func_110434_K().func_110577_a(field_110931_c);
      Tessellator var30 = Tessellator.field_78398_a;
      GL11.glNormal3f(0.0F, 0.0F, -1.0F);
      var30.func_78382_b();
      byte var29 = 7;
      var30.func_78374_a((double) (0 - var29), (double) (128 + var29), 0.0D, 0.0D, 1.0D);
      var30.func_78374_a((double) (128 + var29), (double) (128 + var29), 0.0D, 1.0D, 1.0D);
      var30.func_78374_a((double) (128 + var29), (double) (0 - var29), 0.0D, 1.0D, 0.0D);
      var30.func_78374_a((double) (0 - var29), (double) (0 - var29), 0.0D, 0.0D, 0.0D);
      var30.func_78381_a();
      MapData var19 = Item.field_77744_bd.func_77873_a(var8, this.field_78455_a.field_71441_e);
      if (var19 != null) {
        this.field_78449_f.func_78319_a(
            this.field_78455_a.field_71439_g, this.field_78455_a.func_110434_K(), var19);
      }

      GL11.glPopMatrix();
    } else if (var8 != null) {
      GL11.glPushMatrix();
      var21 = 0.8F;
      if (var3.func_71052_bv() > 0) {
        EnumAction var23 = var8.func_77975_n();
        if (var23 == EnumAction.eat || var23 == EnumAction.drink) {
          var22 = (float) var3.func_71052_bv() - p_78440_1_ + 1.0F;
          var13 = 1.0F - var22 / (float) var8.func_77988_m();
          var14 = 1.0F - var13;
          var14 = var14 * var14 * var14;
          var14 = var14 * var14 * var14;
          var14 = var14 * var14 * var14;
          var15 = 1.0F - var14;
          GL11.glTranslatef(
              0.0F,
              MathHelper.func_76135_e(MathHelper.func_76134_b(var22 / 4.0F * 3.1415927F) * 0.1F)
                  * (float) ((double) var13 > 0.2D ? 1 : 0),
              0.0F);
          GL11.glTranslatef(var15 * 0.6F, -var15 * 0.5F, 0.0F);
          GL11.glRotatef(var15 * 90.0F, 0.0F, 1.0F, 0.0F);
          GL11.glRotatef(var15 * 10.0F, 1.0F, 0.0F, 0.0F);
          GL11.glRotatef(var15 * 30.0F, 0.0F, 0.0F, 1.0F);
        }
      } else {
        var20 = var3.func_70678_g(p_78440_1_);
        var22 = MathHelper.func_76126_a(var20 * 3.1415927F);
        var13 = MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F);
        GL11.glTranslatef(
            -var13 * 0.4F,
            MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F * 2.0F) * 0.2F,
            -var22 * 0.2F);
      }

      GL11.glTranslatef(0.7F * var21, -0.65F * var21 - (1.0F - var2) * 0.6F, -0.9F * var21);
      GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
      GL11.glEnable('\u803a');
      var20 = var3.func_70678_g(p_78440_1_);
      var22 = MathHelper.func_76126_a(var20 * var20 * 3.1415927F);
      var13 = MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F);
      GL11.glRotatef(-var22 * 20.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(-var13 * 20.0F, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(-var13 * 80.0F, 1.0F, 0.0F, 0.0F);
      var14 = 0.4F;
      GL11.glScalef(var14, var14, var14);
      float var17;
      float var18;
      if (var3.func_71052_bv() > 0) {
        EnumAction var25 = var8.func_77975_n();
        if (var25 == EnumAction.block) {
          GL11.glTranslatef(-0.5F, 0.2F, 0.0F);
          GL11.glRotatef(30.0F, 0.0F, 1.0F, 0.0F);
          GL11.glRotatef(-80.0F, 1.0F, 0.0F, 0.0F);
          GL11.glRotatef(60.0F, 0.0F, 1.0F, 0.0F);
        } else if (var25 == EnumAction.bow) {
          GL11.glRotatef(-18.0F, 0.0F, 0.0F, 1.0F);
          GL11.glRotatef(-12.0F, 0.0F, 1.0F, 0.0F);
          GL11.glRotatef(-8.0F, 1.0F, 0.0F, 0.0F);
          GL11.glTranslatef(-0.9F, 0.2F, 0.0F);
          var16 = (float) var8.func_77988_m() - ((float) var3.func_71052_bv() - p_78440_1_ + 1.0F);
          var17 = var16 / 20.0F;
          var17 = (var17 * var17 + var17 * 2.0F) / 3.0F;
          if (var17 > 1.0F) {
            var17 = 1.0F;
          }

          if (var17 > 0.1F) {
            GL11.glTranslatef(
                0.0F,
                MathHelper.func_76126_a((var16 - 0.1F) * 1.3F) * 0.01F * (var17 - 0.1F),
                0.0F);
          }

          GL11.glTranslatef(0.0F, 0.0F, var17 * 0.1F);
          GL11.glRotatef(-335.0F, 0.0F, 0.0F, 1.0F);
          GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F);
          GL11.glTranslatef(0.0F, 0.5F, 0.0F);
          var18 = 1.0F + var17 * 0.2F;
          GL11.glScalef(1.0F, 1.0F, var18);
          GL11.glTranslatef(0.0F, -0.5F, 0.0F);
          GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F);
          GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F);
        }
      }

      if (var8.func_77973_b().func_77629_n_()) {
        GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
      }

      if (var8.func_77973_b().func_77623_v()) {
        this.func_78443_a(var3, var8, 0);
        int var28 = Item.field_77698_e[var8.field_77993_c].func_82790_a(var8, 1);
        var16 = (float) (var28 >> 16 & 255) / 255.0F;
        var17 = (float) (var28 >> 8 & 255) / 255.0F;
        var18 = (float) (var28 & 255) / 255.0F;
        GL11.glColor4f(var9 * var16, var9 * var17, var9 * var18, 1.0F);
        this.func_78443_a(var3, var8, 1);
      } else {
        this.func_78443_a(var3, var8, 0);
      }

      GL11.glPopMatrix();
    } else if (!var3.func_82150_aj()) {
      GL11.glPushMatrix();
      var21 = 0.8F;
      var20 = var3.func_70678_g(p_78440_1_);
      var22 = MathHelper.func_76126_a(var20 * 3.1415927F);
      var13 = MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F);
      GL11.glTranslatef(
          -var13 * 0.3F,
          MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F * 2.0F) * 0.4F,
          -var22 * 0.4F);
      GL11.glTranslatef(0.8F * var21, -0.75F * var21 - (1.0F - var2) * 0.6F, -0.9F * var21);
      GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
      GL11.glEnable('\u803a');
      var20 = var3.func_70678_g(p_78440_1_);
      var22 = MathHelper.func_76126_a(var20 * var20 * 3.1415927F);
      var13 = MathHelper.func_76126_a(MathHelper.func_76129_c(var20) * 3.1415927F);
      GL11.glRotatef(var13 * 70.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(-var22 * 20.0F, 0.0F, 0.0F, 1.0F);
      this.field_78455_a.func_110434_K().func_110577_a(var3.func_110306_p());
      GL11.glTranslatef(-1.0F, 3.6F, 3.5F);
      GL11.glRotatef(120.0F, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(200.0F, 1.0F, 0.0F, 0.0F);
      GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
      GL11.glScalef(1.0F, 1.0F, 1.0F);
      GL11.glTranslatef(5.6F, 0.0F, 0.0F);
      var27 = RenderManager.field_78727_a.func_78713_a(this.field_78455_a.field_71439_g);
      var26 = (RenderPlayer) var27;
      var16 = 1.0F;
      GL11.glScalef(var16, var16, var16);
      var26.func_82441_a(this.field_78455_a.field_71439_g);
      GL11.glPopMatrix();
    }

    GL11.glDisable('\u803a');
    RenderHelper.func_74518_a();
  }