Пример #1
0
  public void func_78443_a(EntityLiving p_78443_1_, ItemStack p_78443_2_, int p_78443_3_) {
    GL11.glPushMatrix();
    Block var4 = Block.field_71973_m[p_78443_2_.field_77993_c];
    if (var4 != null && RenderBlocks.func_78597_b(var4.func_71857_b())) {
      GL11.glBindTexture(3553, this.field_78455_a.field_71446_o.func_78341_b("/terrain.png"));
      this.field_78452_e.func_78600_a(var4, p_78443_2_.func_77960_j(), 1.0F);
    } else {
      if (var4 != null) {
        GL11.glBindTexture(3553, this.field_78455_a.field_71446_o.func_78341_b("/terrain.png"));
      } else {
        GL11.glBindTexture(3553, this.field_78455_a.field_71446_o.func_78341_b("/gui/items.png"));
      }

      Tessellator var5 = Tessellator.field_78398_a;
      int var6 = p_78443_1_.func_70620_b(p_78443_2_, p_78443_3_);
      float var7 = ((float) (var6 % 16 * 16) + 0.0F) / 256.0F;
      float var8 = ((float) (var6 % 16 * 16) + 15.99F) / 256.0F;
      float var9 = ((float) (var6 / 16 * 16) + 0.0F) / 256.0F;
      float var10 = ((float) (var6 / 16 * 16) + 15.99F) / 256.0F;
      float var11 = 0.0F;
      float var12 = 0.3F;
      GL11.glEnable('\u803a');
      GL11.glTranslatef(-var11, -var12, 0.0F);
      float var13 = 1.5F;
      GL11.glScalef(var13, var13, var13);
      GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F);
      GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F);
      func_78439_a(var5, var8, var9, var7, var10, 0.0625F);
      if (p_78443_2_ != null && p_78443_2_.func_77962_s() && p_78443_3_ == 0) {
        GL11.glDepthFunc(514);
        GL11.glDisable(2896);
        this.field_78455_a.field_71446_o.func_78342_b(
            this.field_78455_a.field_71446_o.func_78341_b("%blur%/misc/glint.png"));
        GL11.glEnable(3042);
        GL11.glBlendFunc(768, 1);
        float var14 = 0.76F;
        GL11.glColor4f(0.5F * var14, 0.25F * var14, 0.8F * var14, 1.0F);
        GL11.glMatrixMode(5890);
        GL11.glPushMatrix();
        float var15 = 0.125F;
        GL11.glScalef(var15, var15, var15);
        float var16 = (float) (Minecraft.func_71386_F() % 3000L) / 3000.0F * 8.0F;
        GL11.glTranslatef(var16, 0.0F, 0.0F);
        GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
        func_78439_a(var5, 0.0F, 0.0F, 1.0F, 1.0F, 0.0625F);
        GL11.glPopMatrix();
        GL11.glPushMatrix();
        GL11.glScalef(var15, var15, var15);
        var16 = (float) (Minecraft.func_71386_F() % 4873L) / 4873.0F * 8.0F;
        GL11.glTranslatef(-var16, 0.0F, 0.0F);
        GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
        func_78439_a(var5, 0.0F, 0.0F, 1.0F, 1.0F, 0.0625F);
        GL11.glPopMatrix();
        GL11.glMatrixMode(5888);
        GL11.glDisable(3042);
        GL11.glEnable(2896);
        GL11.glDepthFunc(515);
      }

      GL11.glDisable('\u803a');
    }

    GL11.glPopMatrix();
  }
Пример #2
0
  public void func_78443_a(EntityLivingBase p_78443_1_, ItemStack p_78443_2_, int p_78443_3_) {
    GL11.glPushMatrix();
    TextureManager var4 = this.field_78455_a.func_110434_K();
    if (p_78443_2_.func_94608_d() == 0
        && p_78443_2_.field_77993_c < Block.field_71973_m.length
        && Block.field_71973_m[p_78443_2_.field_77993_c] != null
        && RenderBlocks.func_78597_b(
            Block.field_71973_m[p_78443_2_.field_77993_c].func_71857_b())) {
      var4.func_110577_a(var4.func_130087_a(0));
      this.field_78452_e.func_78600_a(
          Block.field_71973_m[p_78443_2_.field_77993_c], p_78443_2_.func_77960_j(), 1.0F);
    } else {
      Icon var5 = p_78443_1_.func_70620_b(p_78443_2_, p_78443_3_);
      if (var5 == null) {
        GL11.glPopMatrix();
        return;
      }

      var4.func_110577_a(var4.func_130087_a(p_78443_2_.func_94608_d()));
      Tessellator var6 = Tessellator.field_78398_a;
      float var7 = var5.func_94209_e();
      float var8 = var5.func_94212_f();
      float var9 = var5.func_94206_g();
      float var10 = var5.func_94210_h();
      float var11 = 0.0F;
      float var12 = 0.3F;
      GL11.glEnable('\u803a');
      GL11.glTranslatef(-var11, -var12, 0.0F);
      float var13 = 1.5F;
      GL11.glScalef(var13, var13, var13);
      GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F);
      GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F);
      func_78439_a(
          var6, var8, var9, var7, var10, var5.func_94211_a(), var5.func_94216_b(), 0.0625F);
      if (p_78443_2_.func_77962_s() && p_78443_3_ == 0) {
        GL11.glDepthFunc(514);
        GL11.glDisable(2896);
        var4.func_110577_a(field_110930_b);
        GL11.glEnable(3042);
        GL11.glBlendFunc(768, 1);
        float var14 = 0.76F;
        GL11.glColor4f(0.5F * var14, 0.25F * var14, 0.8F * var14, 1.0F);
        GL11.glMatrixMode(5890);
        GL11.glPushMatrix();
        float var15 = 0.125F;
        GL11.glScalef(var15, var15, var15);
        float var16 = (float) (Minecraft.func_71386_F() % 3000L) / 3000.0F * 8.0F;
        GL11.glTranslatef(var16, 0.0F, 0.0F);
        GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
        func_78439_a(var6, 0.0F, 0.0F, 1.0F, 1.0F, 256, 256, 0.0625F);
        GL11.glPopMatrix();
        GL11.glPushMatrix();
        GL11.glScalef(var15, var15, var15);
        var16 = (float) (Minecraft.func_71386_F() % 4873L) / 4873.0F * 8.0F;
        GL11.glTranslatef(-var16, 0.0F, 0.0F);
        GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
        func_78439_a(var6, 0.0F, 0.0F, 1.0F, 1.0F, 256, 256, 0.0625F);
        GL11.glPopMatrix();
        GL11.glMatrixMode(5888);
        GL11.glDisable(3042);
        GL11.glEnable(2896);
        GL11.glDepthFunc(515);
      }

      GL11.glDisable('\u803a');
    }

    GL11.glPopMatrix();
  }