Esempio n. 1
0
 public void superRenderPlayer(
     AbstractClientPlayer entityplayer,
     double d,
     double d1,
     double d2,
     float f,
     float renderPartialTicks) {
   super.doRender(entityplayer, d, d1, d2, f, renderPartialTicks);
 }
Esempio 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();
  }
Esempio n. 3
0
 public void superRenderSpecials(AbstractClientPlayer entityplayer, float f) {
   super.preRenderCallback(entityplayer, f);
 }
Esempio n. 4
0
 public void superRotatePlayer(
     AbstractClientPlayer entityplayer, float totalTime, float actualRotation, float f2) {
   super.rotateCorpse(entityplayer, totalTime, actualRotation, f2);
 }
Esempio n. 5
0
 public void superDrawFirstPersonHand(EntityPlayer entityPlayer) {
   super.renderFirstPersonArm(entityPlayer);
 }
Esempio n. 6
0
  /**
   * Renders the active item in the player's hand when in first person mode. Args: partialTickTime
   */
  public void renderItemInFirstPerson(float par1) {
    float f1 =
        this.prevEquippedProgress + (this.equippedProgress - this.prevEquippedProgress) * par1;
    EntityClientPlayerMP entityclientplayermp = this.mc.thePlayer;
    float f2 =
        entityclientplayermp.prevRotationPitch
            + (entityclientplayermp.rotationPitch - entityclientplayermp.prevRotationPitch) * par1;
    GL11.glPushMatrix();
    GL11.glRotatef(f2, 1.0F, 0.0F, 0.0F);
    GL11.glRotatef(
        entityclientplayermp.prevRotationYaw
            + (entityclientplayermp.rotationYaw - entityclientplayermp.prevRotationYaw) * par1,
        0.0F,
        1.0F,
        0.0F);
    RenderHelper.enableStandardItemLighting();
    GL11.glPopMatrix();
    float f3;
    float f4;

    if (entityclientplayermp instanceof EntityPlayerSP) {
      EntityPlayerSP entityplayersp = (EntityPlayerSP) entityclientplayermp;
      f3 =
          entityplayersp.prevRenderArmPitch
              + (entityplayersp.renderArmPitch - entityplayersp.prevRenderArmPitch) * par1;
      f4 =
          entityplayersp.prevRenderArmYaw
              + (entityplayersp.renderArmYaw - entityplayersp.prevRenderArmYaw) * par1;
      GL11.glRotatef((entityclientplayermp.rotationPitch - f3) * 0.1F, 1.0F, 0.0F, 0.0F);
      GL11.glRotatef((entityclientplayermp.rotationYaw - f4) * 0.1F, 0.0F, 1.0F, 0.0F);
    }

    ItemStack itemstack = this.itemToRender;
    f3 =
        this.mc.theWorld.getLightBrightness(
            MathHelper.floor_double(entityclientplayermp.posX),
            MathHelper.floor_double(entityclientplayermp.posY),
            MathHelper.floor_double(entityclientplayermp.posZ));
    f3 = 1.0F;
    int i =
        this.mc.theWorld.getLightBrightnessForSkyBlocks(
            MathHelper.floor_double(entityclientplayermp.posX),
            MathHelper.floor_double(entityclientplayermp.posY),
            MathHelper.floor_double(entityclientplayermp.posZ),
            0);
    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(
        OpenGlHelper.lightmapTexUnit, (float) j / 1.0F, (float) k / 1.0F);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    float f5;
    float f6;
    float f7;

    if (itemstack != null) {
      i = Item.itemsList[itemstack.itemID].getColorFromItemStack(itemstack, 0);
      f7 = (float) (i >> 16 & 255) / 255.0F;
      f6 = (float) (i >> 8 & 255) / 255.0F;
      f5 = (float) (i & 255) / 255.0F;
      GL11.glColor4f(f3 * f7, f3 * f6, f3 * f5, 1.0F);
    } else {
      GL11.glColor4f(f3, f3, f3, 1.0F);
    }

    float f8;
    float f9;
    float f10;
    Render render;
    RenderPlayer renderplayer;

    if (itemstack != null && itemstack.getItem() instanceof ItemMap) {
      GL11.glPushMatrix();
      f4 = 0.8F;
      f7 = entityclientplayermp.getSwingProgress(par1);
      f6 = MathHelper.sin(f7 * (float) Math.PI);
      f5 = MathHelper.sin(MathHelper.sqrt_float(f7) * (float) Math.PI);
      GL11.glTranslatef(
          -f5 * 0.4F,
          MathHelper.sin(MathHelper.sqrt_float(f7) * (float) Math.PI * 2.0F) * 0.2F,
          -f6 * 0.2F);
      f7 = 1.0F - f2 / 45.0F + 0.1F;

      if (f7 < 0.0F) {
        f7 = 0.0F;
      }

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

      f7 = -MathHelper.cos(f7 * (float) Math.PI) * 0.5F + 0.5F;
      GL11.glTranslatef(0.0F, 0.0F * f4 - (1.0F - f1) * 1.2F - f7 * 0.5F + 0.04F, -0.9F * f4);
      GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(f7 * -85.0F, 0.0F, 0.0F, 1.0F);
      GL11.glEnable(GL12.GL_RESCALE_NORMAL);
      GL11.glBindTexture(
          GL11.GL_TEXTURE_2D,
          this.mc.renderEngine.getTextureForDownloadableImage(
              this.mc.thePlayer.skinUrl, this.mc.thePlayer.getTexture()));
      this.mc.renderEngine.resetBoundTexture();

      for (k = 0; k < 2; ++k) {
        int l = k * 2 - 1;
        GL11.glPushMatrix();
        GL11.glTranslatef(-0.0F, -0.6F, 1.1F * (float) l);
        GL11.glRotatef((float) (-45 * l), 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 * l), 0.0F, 1.0F, 0.0F);
        render = RenderManager.instance.getEntityRenderObject(this.mc.thePlayer);
        renderplayer = (RenderPlayer) render;
        f10 = 1.0F;
        GL11.glScalef(f10, f10, f10);
        renderplayer.renderFirstPersonArm(this.mc.thePlayer);
        GL11.glPopMatrix();
      }

      f6 = entityclientplayermp.getSwingProgress(par1);
      f5 = MathHelper.sin(f6 * f6 * (float) Math.PI);
      f8 = MathHelper.sin(MathHelper.sqrt_float(f6) * (float) Math.PI);
      GL11.glRotatef(-f5 * 20.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(-f8 * 20.0F, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(-f8 * 80.0F, 1.0F, 0.0F, 0.0F);
      f9 = 0.38F;
      GL11.glScalef(f9, f9, f9);
      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);
      f10 = 0.015625F;
      GL11.glScalef(f10, f10, f10);
      this.mc.renderEngine.bindTexture("/misc/mapbg.png");
      Tessellator tessellator = Tessellator.instance;
      GL11.glNormal3f(0.0F, 0.0F, -1.0F);
      tessellator.startDrawingQuads();
      byte b0 = 7;
      tessellator.addVertexWithUV((double) (0 - b0), (double) (128 + b0), 0.0D, 0.0D, 1.0D);
      tessellator.addVertexWithUV((double) (128 + b0), (double) (128 + b0), 0.0D, 1.0D, 1.0D);
      tessellator.addVertexWithUV((double) (128 + b0), (double) (0 - b0), 0.0D, 1.0D, 0.0D);
      tessellator.addVertexWithUV((double) (0 - b0), (double) (0 - b0), 0.0D, 0.0D, 0.0D);
      tessellator.draw();

      IItemRenderer custom = MinecraftForgeClient.getItemRenderer(itemstack, FIRST_PERSON_MAP);
      MapData mapdata = ((ItemMap) itemstack.getItem()).getMapData(itemstack, this.mc.theWorld);

      if (custom == null) {
        if (mapdata != null) {
          this.mapItemRenderer.renderMap(this.mc.thePlayer, this.mc.renderEngine, mapdata);
        }
      } else {
        custom.renderItem(FIRST_PERSON_MAP, itemstack, mc.thePlayer, mc.renderEngine, mapdata);
      }

      GL11.glPopMatrix();
    } else if (itemstack != null) {
      GL11.glPushMatrix();
      f4 = 0.8F;

      if (entityclientplayermp.getItemInUseCount() > 0) {
        EnumAction enumaction = itemstack.getItemUseAction();

        if (enumaction == EnumAction.eat || enumaction == EnumAction.drink) {
          f6 = (float) entityclientplayermp.getItemInUseCount() - par1 + 1.0F;
          f5 = 1.0F - f6 / (float) itemstack.getMaxItemUseDuration();
          f8 = 1.0F - f5;
          f8 = f8 * f8 * f8;
          f8 = f8 * f8 * f8;
          f8 = f8 * f8 * f8;
          f9 = 1.0F - f8;
          GL11.glTranslatef(
              0.0F,
              MathHelper.abs(MathHelper.cos(f6 / 4.0F * (float) Math.PI) * 0.1F)
                  * (float) ((double) f5 > 0.2D ? 1 : 0),
              0.0F);
          GL11.glTranslatef(f9 * 0.6F, -f9 * 0.5F, 0.0F);
          GL11.glRotatef(f9 * 90.0F, 0.0F, 1.0F, 0.0F);
          GL11.glRotatef(f9 * 10.0F, 1.0F, 0.0F, 0.0F);
          GL11.glRotatef(f9 * 30.0F, 0.0F, 0.0F, 1.0F);
        }
      } else {
        f7 = entityclientplayermp.getSwingProgress(par1);
        f6 = MathHelper.sin(f7 * (float) Math.PI);
        f5 = MathHelper.sin(MathHelper.sqrt_float(f7) * (float) Math.PI);
        GL11.glTranslatef(
            -f5 * 0.4F,
            MathHelper.sin(MathHelper.sqrt_float(f7) * (float) Math.PI * 2.0F) * 0.2F,
            -f6 * 0.2F);
      }

      GL11.glTranslatef(0.7F * f4, -0.65F * f4 - (1.0F - f1) * 0.6F, -0.9F * f4);
      GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
      GL11.glEnable(GL12.GL_RESCALE_NORMAL);
      f7 = entityclientplayermp.getSwingProgress(par1);
      f6 = MathHelper.sin(f7 * f7 * (float) Math.PI);
      f5 = MathHelper.sin(MathHelper.sqrt_float(f7) * (float) Math.PI);
      GL11.glRotatef(-f6 * 20.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(-f5 * 20.0F, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(-f5 * 80.0F, 1.0F, 0.0F, 0.0F);
      f8 = 0.4F;
      GL11.glScalef(f8, f8, f8);
      float f11;
      float f12;

      if (entityclientplayermp.getItemInUseCount() > 0) {
        EnumAction enumaction1 = itemstack.getItemUseAction();

        if (enumaction1 == 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 (enumaction1 == 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);
          f10 =
              (float) itemstack.getMaxItemUseDuration()
                  - ((float) entityclientplayermp.getItemInUseCount() - par1 + 1.0F);
          f11 = f10 / 20.0F;
          f11 = (f11 * f11 + f11 * 2.0F) / 3.0F;

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

          if (f11 > 0.1F) {
            GL11.glTranslatef(
                0.0F, MathHelper.sin((f10 - 0.1F) * 1.3F) * 0.01F * (f11 - 0.1F), 0.0F);
          }

          GL11.glTranslatef(0.0F, 0.0F, f11 * 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);
          f12 = 1.0F + f11 * 0.2F;
          GL11.glScalef(1.0F, 1.0F, f12);
          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 (itemstack.getItem().shouldRotateAroundWhenRendering()) {
        GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
      }

      if (itemstack.getItem().requiresMultipleRenderPasses()) {
        this.renderItem(entityclientplayermp, itemstack, 0);
        for (int x = 1; x < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); x++) {
          int i1 = Item.itemsList[itemstack.itemID].getColorFromItemStack(itemstack, x);
          f10 = (float) (i1 >> 16 & 255) / 255.0F;
          f11 = (float) (i1 >> 8 & 255) / 255.0F;
          f12 = (float) (i1 & 255) / 255.0F;
          GL11.glColor4f(f3 * f10, f3 * f11, f3 * f12, 1.0F);
          this.renderItem(entityclientplayermp, itemstack, x);
        }
      } else {
        this.renderItem(entityclientplayermp, itemstack, 0);
      }

      GL11.glPopMatrix();
    } else if (!entityclientplayermp.getHasActivePotion()) {
      GL11.glPushMatrix();
      f4 = 0.8F;
      f7 = entityclientplayermp.getSwingProgress(par1);
      f6 = MathHelper.sin(f7 * (float) Math.PI);
      f5 = MathHelper.sin(MathHelper.sqrt_float(f7) * (float) Math.PI);
      GL11.glTranslatef(
          -f5 * 0.3F,
          MathHelper.sin(MathHelper.sqrt_float(f7) * (float) Math.PI * 2.0F) * 0.4F,
          -f6 * 0.4F);
      GL11.glTranslatef(0.8F * f4, -0.75F * f4 - (1.0F - f1) * 0.6F, -0.9F * f4);
      GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
      GL11.glEnable(GL12.GL_RESCALE_NORMAL);
      f7 = entityclientplayermp.getSwingProgress(par1);
      f6 = MathHelper.sin(f7 * f7 * (float) Math.PI);
      f5 = MathHelper.sin(MathHelper.sqrt_float(f7) * (float) Math.PI);
      GL11.glRotatef(f5 * 70.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(-f6 * 20.0F, 0.0F, 0.0F, 1.0F);
      GL11.glBindTexture(
          GL11.GL_TEXTURE_2D,
          this.mc.renderEngine.getTextureForDownloadableImage(
              this.mc.thePlayer.skinUrl, this.mc.thePlayer.getTexture()));
      this.mc.renderEngine.resetBoundTexture();
      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);
      render = RenderManager.instance.getEntityRenderObject(this.mc.thePlayer);
      renderplayer = (RenderPlayer) render;
      f10 = 1.0F;
      GL11.glScalef(f10, f10, f10);
      renderplayer.renderFirstPersonArm(this.mc.thePlayer);
      GL11.glPopMatrix();
    }

    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    RenderHelper.disableStandardItemLighting();
  }
  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();
  }