Exemplo n.º 1
0
  public void func_188_a(
      EntityPlayer p_188_1_,
      double p_188_2_,
      double p_188_4_,
      double p_188_6_,
      float p_188_8_,
      float p_188_9_) {
    ItemStack var10 = p_188_1_.field_778_b.func_494_a();
    this.field_208_g.field_1278_i =
        this.field_207_h.field_1278_i = this.field_209_f.field_1278_i = var10 != null ? 1 : 0;
    if (var10 != null && p_188_1_.func_35205_Y() > 0) {
      EnumAction var11 = var10.func_35865_n();
      if (var11 == EnumAction.block) {
        this.field_208_g.field_1278_i =
            this.field_207_h.field_1278_i = this.field_209_f.field_1278_i = 3;
      } else if (var11 == EnumAction.bow) {
        this.field_208_g.field_40333_u =
            this.field_207_h.field_40333_u = this.field_209_f.field_40333_u = true;
      }
    }

    this.field_208_g.field_1277_j =
        this.field_207_h.field_1277_j = this.field_209_f.field_1277_j = p_188_1_.func_381_o();
    double var13 = p_188_4_ - (double) p_188_1_.field_9292_aO;
    if (p_188_1_.func_381_o() && !(p_188_1_ instanceof EntityPlayerSP)) {
      var13 -= 0.125D;
    }

    super.func_171_a(p_188_1_, p_188_2_, var13, p_188_6_, p_188_8_, p_188_9_);
    this.field_208_g.field_40333_u =
        this.field_207_h.field_40333_u = this.field_209_f.field_40333_u = false;
    this.field_208_g.field_1277_j =
        this.field_207_h.field_1277_j = this.field_209_f.field_1277_j = false;
    this.field_208_g.field_1278_i =
        this.field_207_h.field_1278_i = this.field_209_f.field_1278_i = 0;
  }
Exemplo n.º 2
0
  protected void func_4015_a(EntityPlayer p_4015_1_, float p_4015_2_) {
    super.func_6331_b(p_4015_1_, p_4015_2_);
    ItemStack var3 = p_4015_1_.field_778_b.func_492_d(3);
    if (var3 != null && var3.func_1091_a().field_291_aS < 256) {
      GL11.glPushMatrix();
      this.field_209_f.field_1286_a.func_926_b(0.0625F);
      if (RenderBlocks.func_1219_a(Block.field_345_n[var3.field_1617_c].func_210_f())) {
        float var4 = 0.625F;
        GL11.glTranslatef(0.0F, -0.25F, 0.0F);
        GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(var4, -var4, var4);
      }

      this.field_191_a.field_4236_f.func_4132_a(p_4015_1_, var3, 0);
      GL11.glPopMatrix();
    }

    float var6;
    if (p_4015_1_.field_771_i.equals("deadmau5")
        && this.func_140_a(p_4015_1_.field_20047_bv, (String) null)) {
      for (int var19 = 0; var19 < 2; ++var19) {
        float var5 =
            p_4015_1_.field_603_as
                + (p_4015_1_.field_605_aq - p_4015_1_.field_603_as) * p_4015_2_
                - (p_4015_1_.field_734_o
                    + (p_4015_1_.field_735_n - p_4015_1_.field_734_o) * p_4015_2_);
        var6 =
            p_4015_1_.field_602_at + (p_4015_1_.field_604_ar - p_4015_1_.field_602_at) * p_4015_2_;
        GL11.glPushMatrix();
        GL11.glRotatef(var5, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(var6, 1.0F, 0.0F, 0.0F);
        GL11.glTranslatef(0.375F * (float) (var19 * 2 - 1), 0.0F, 0.0F);
        GL11.glTranslatef(0.0F, -0.375F, 0.0F);
        GL11.glRotatef(-var6, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(-var5, 0.0F, 1.0F, 0.0F);
        float var7 = 1.3333334F;
        GL11.glScalef(var7, var7, var7);
        this.field_209_f.func_20095_a(0.0625F);
        GL11.glPopMatrix();
      }
    }

    float var10;
    if (this.func_140_a(p_4015_1_.field_20067_q, (String) null)) {
      GL11.glPushMatrix();
      GL11.glTranslatef(0.0F, 0.0F, 0.125F);
      double var22 =
          p_4015_1_.field_20066_r
              + (p_4015_1_.field_20063_u - p_4015_1_.field_20066_r) * (double) p_4015_2_
              - (p_4015_1_.field_9285_at
                  + (p_4015_1_.field_611_ak - p_4015_1_.field_9285_at) * (double) p_4015_2_);
      double var23 =
          p_4015_1_.field_20065_s
              + (p_4015_1_.field_20062_v - p_4015_1_.field_20065_s) * (double) p_4015_2_
              - (p_4015_1_.field_9284_au
                  + (p_4015_1_.field_610_al - p_4015_1_.field_9284_au) * (double) p_4015_2_);
      double var8 =
          p_4015_1_.field_20064_t
              + (p_4015_1_.field_20061_w - p_4015_1_.field_20064_t) * (double) p_4015_2_
              - (p_4015_1_.field_9283_av
                  + (p_4015_1_.field_609_am - p_4015_1_.field_9283_av) * (double) p_4015_2_);
      var10 = p_4015_1_.field_734_o + (p_4015_1_.field_735_n - p_4015_1_.field_734_o) * p_4015_2_;
      double var11 = (double) MathHelper.func_1106_a(var10 * 3.1415927F / 180.0F);
      double var13 = (double) (-MathHelper.func_1114_b(var10 * 3.1415927F / 180.0F));
      float var15 = (float) var23 * 10.0F;
      if (var15 < -6.0F) {
        var15 = -6.0F;
      }

      if (var15 > 32.0F) {
        var15 = 32.0F;
      }

      float var16 = (float) (var22 * var11 + var8 * var13) * 100.0F;
      float var17 = (float) (var22 * var13 - var8 * var11) * 100.0F;
      if (var16 < 0.0F) {
        var16 = 0.0F;
      }

      float var18 =
          p_4015_1_.field_775_e + (p_4015_1_.field_774_f - p_4015_1_.field_775_e) * p_4015_2_;
      var15 +=
          MathHelper.func_1106_a(
                  (p_4015_1_.field_9291_aR
                          + (p_4015_1_.field_9290_aS - p_4015_1_.field_9291_aR) * p_4015_2_)
                      * 6.0F)
              * 32.0F
              * var18;
      if (p_4015_1_.func_381_o()) {
        var15 += 25.0F;
      }

      GL11.glRotatef(6.0F + var16 / 2.0F + var15, 1.0F, 0.0F, 0.0F);
      GL11.glRotatef(var17 / 2.0F, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(-var17 / 2.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
      this.field_209_f.func_20096_b(0.0625F);
      GL11.glPopMatrix();
    }

    ItemStack var21 = p_4015_1_.field_778_b.func_494_a();
    if (var21 != null) {
      GL11.glPushMatrix();
      this.field_209_f.field_1283_d.func_926_b(0.0625F);
      GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
      if (p_4015_1_.field_4128_n != null) {
        var21 = new ItemStack(Item.field_266_B);
      }

      EnumAction var20 = null;
      if (p_4015_1_.func_35205_Y() > 0) {
        var20 = var21.func_35865_n();
      }

      if (var21.field_1617_c < 256
          && RenderBlocks.func_1219_a(Block.field_345_n[var21.field_1617_c].func_210_f())) {
        var6 = 0.5F;
        GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
        var6 *= 0.75F;
        GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(var6, -var6, var6);
      } else if (var21.field_1617_c == Item.field_227_i.field_291_aS) {
        var6 = 0.625F;
        GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
        GL11.glRotatef(-20.0F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(var6, -var6, var6);
        GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
      } else if (Item.field_233_c[var21.field_1617_c].func_4017_a()) {
        var6 = 0.625F;
        if (Item.field_233_c[var21.field_1617_c].func_4023_b()) {
          GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
          GL11.glTranslatef(0.0F, -0.125F, 0.0F);
        }

        if (p_4015_1_.func_35205_Y() > 0 && var20 == EnumAction.block) {
          GL11.glTranslatef(0.05F, 0.0F, -0.1F);
          GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F);
          GL11.glRotatef(-10.0F, 1.0F, 0.0F, 0.0F);
          GL11.glRotatef(-60.0F, 0.0F, 0.0F, 1.0F);
        }

        GL11.glTranslatef(0.0F, 0.1875F, 0.0F);
        GL11.glScalef(var6, -var6, var6);
        GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
      } else {
        var6 = 0.375F;
        GL11.glTranslatef(0.25F, 0.1875F, -0.1875F);
        GL11.glScalef(var6, var6, var6);
        GL11.glRotatef(60.0F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(20.0F, 0.0F, 0.0F, 1.0F);
      }

      if (var21.func_1091_a().func_46058_c()) {
        for (int var25 = 0; var25 <= 1; ++var25) {
          int var24 = var21.func_1091_a().func_27010_f(var21.func_21181_i(), var25);
          float var26 = (float) (var24 >> 16 & 255) / 255.0F;
          float var9 = (float) (var24 >> 8 & 255) / 255.0F;
          var10 = (float) (var24 & 255) / 255.0F;
          GL11.glColor4f(var26, var9, var10, 1.0F);
          this.field_191_a.field_4236_f.func_4132_a(p_4015_1_, var21, var25);
        }
      } else {
        this.field_191_a.field_4236_f.func_4132_a(p_4015_1_, var21, 0);
      }

      GL11.glPopMatrix();
    }
  }