@SideOnly(Side.CLIENT)
 public Packet102WindowClick(
     int p_i1421_1_,
     int p_i1421_2_,
     int p_i1421_3_,
     int p_i1421_4_,
     ItemStack p_i1421_5_,
     short p_i1421_6_) {
   this.field_73444_a = p_i1421_1_;
   this.field_73442_b = p_i1421_2_;
   this.field_73443_c = p_i1421_3_;
   this.field_73441_e = p_i1421_5_ != null ? p_i1421_5_.func_77946_l() : null;
   this.field_73440_d = p_i1421_6_;
   this.field_73439_f = p_i1421_4_;
 }
  public ItemStack func_82846_b(EntityPlayer p_82846_1_, int p_82846_2_) {
    ItemStack var3 = null;
    Slot var4 = (Slot) this.field_75151_b.get(p_82846_2_);
    if (var4 != null && var4.func_75216_d()) {
      ItemStack var5 = var4.func_75211_c();
      var3 = var5.func_77946_l();
      if (p_82846_2_ == 2) {
        if (!this.func_75135_a(var5, 3, 39, true)) {
          return null;
        }

        var4.func_75220_a(var5, var3);
      } else if (p_82846_2_ != 1 && p_82846_2_ != 0) {
        if (FurnaceRecipes.func_77602_a().func_77603_b(var5.func_77973_b().field_77779_bT)
            != null) {
          if (!this.func_75135_a(var5, 0, 1, false)) {
            return null;
          }
        } else if (TileEntityFurnace.func_70401_b(var5)) {
          if (!this.func_75135_a(var5, 1, 2, false)) {
            return null;
          }
        } else if (p_82846_2_ >= 3 && p_82846_2_ < 30) {
          if (!this.func_75135_a(var5, 30, 39, false)) {
            return null;
          }
        } else if (p_82846_2_ >= 30 && p_82846_2_ < 39 && !this.func_75135_a(var5, 3, 30, false)) {
          return null;
        }
      } else if (!this.func_75135_a(var5, 3, 39, false)) {
        return null;
      }

      if (var5.field_77994_a == 0) {
        var4.func_75215_d((ItemStack) null);
      } else {
        var4.func_75218_e();
      }

      if (var5.field_77994_a == var3.field_77994_a) {
        return null;
      }

      var4.func_82870_a(p_82846_1_, var5);
    }

    return var3;
  }
  public ItemStack func_77659_a(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
    ItemStack var4 = new ItemStack(Items.field_151098_aY, 1, p_77659_2_.func_72841_b("map"));
    String var5 = "map_" + var4.func_77960_j();
    MapData var6 = new MapData(var5);
    p_77659_2_.func_72823_a(var5, var6);
    var6.field_76197_d = 0;
    var6.func_176054_a(p_77659_3_.field_70165_t, p_77659_3_.field_70161_v, var6.field_76197_d);
    var6.field_76200_c = (byte) p_77659_2_.field_73011_w.func_177502_q();
    var6.func_76185_a();
    --p_77659_1_.field_77994_a;
    if (p_77659_1_.field_77994_a <= 0) {
      return var4;
    } else {
      if (!p_77659_3_.field_71071_by.func_70441_a(var4.func_77946_l())) {
        p_77659_3_.func_71019_a(var4, false);
      }

      p_77659_3_.func_71029_a(StatList.field_75929_E[Item.func_150891_b(this)]);
      return p_77659_1_;
    }
  }
  protected void func_74192_a(Slot p_74192_1_) {
    int var2 = p_74192_1_.field_75223_e;
    int var3 = p_74192_1_.field_75221_f;
    ItemStack var4 = p_74192_1_.func_75211_c();
    boolean var5 =
        p_74192_1_ == this.field_85051_p && this.field_85050_q != null && !this.field_90018_r;
    if (p_74192_1_ == this.field_85051_p
        && this.field_85050_q != null
        && this.field_90018_r
        && var4 != null) {
      var4 = var4.func_77946_l();
      var4.field_77994_a /= 2;
    }

    this.field_73735_i = 100.0F;
    field_74196_a.field_77023_b = 100.0F;
    if (var4 == null) {
      int var6 = p_74192_1_.func_75212_b();
      if (var6 >= 0) {
        GL11.glDisable(2896);
        this.field_73882_e.field_71446_o.func_78342_b(
            this.field_73882_e.field_71446_o.func_78341_b("/gui/items.png"));
        this.func_73729_b(var2, var3, var6 % 16 * 16, var6 / 16 * 16, 16, 16);
        GL11.glEnable(2896);
        var5 = true;
      }
    }

    if (!var5) {
      GL11.glEnable(2929);
      field_74196_a.func_82406_b(
          this.field_73886_k, this.field_73882_e.field_71446_o, var4, var2, var3);
      field_74196_a.func_77021_b(
          this.field_73886_k, this.field_73882_e.field_71446_o, var4, var2, var3);
    }

    field_74196_a.field_77023_b = 0.0F;
    this.field_73735_i = 0.0F;
  }
  public ItemStack func_82846_b(EntityPlayer p_82846_1_, int p_82846_2_) {
    ItemStack var3 = null;
    Slot var4 = (Slot) this.field_75151_b.get(p_82846_2_);
    if (var4 != null && var4.func_75216_d()) {
      ItemStack var5 = var4.func_75211_c();
      var3 = var5.func_77946_l();
      if (p_82846_2_ < this.field_75154_f * 9) {
        if (!this.func_75135_a(var5, this.field_75154_f * 9, this.field_75151_b.size(), true)) {
          return null;
        }
      } else if (!this.func_75135_a(var5, 0, this.field_75154_f * 9, false)) {
        return null;
      }

      if (var5.field_77994_a == 0) {
        var4.func_75215_d((ItemStack) null);
      } else {
        var4.func_75218_e();
      }
    }

    return var3;
  }
 public Packet5PlayerInventory(int p_i1467_1_, int p_i1467_2_, ItemStack p_i1467_3_) {
   this.field_73400_a = p_i1467_1_;
   this.field_73398_b = p_i1467_2_;
   this.field_73399_c = p_i1467_3_ == null ? null : p_i1467_3_.func_77946_l();
 }
  public void func_73863_a(int p_73863_1_, int p_73863_2_, float p_73863_3_) {
    this.func_73873_v_();
    int var4 = this.field_74198_m;
    int var5 = this.field_74197_n;
    this.func_74185_a(p_73863_3_, p_73863_1_, p_73863_2_);
    GL11.glDisable('\u803a');
    RenderHelper.func_74518_a();
    GL11.glDisable(2896);
    GL11.glDisable(2929);
    super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
    RenderHelper.func_74520_c();
    GL11.glPushMatrix();
    GL11.glTranslatef((float) var4, (float) var5, 0.0F);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glEnable('\u803a');
    this.field_82320_o = null;
    short var6 = 240;
    short var7 = 240;
    OpenGlHelper.func_77475_a(OpenGlHelper.field_77476_b, (float) var6 / 1.0F, (float) var7 / 1.0F);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

    int var9;
    for (int var13 = 0; var13 < this.field_74193_d.field_75151_b.size(); ++var13) {
      Slot var14 = (Slot) this.field_74193_d.field_75151_b.get(var13);
      this.func_74192_a(var14);
      if (this.func_74186_a(var14, p_73863_1_, p_73863_2_)) {
        this.field_82320_o = var14;
        GL11.glDisable(2896);
        GL11.glDisable(2929);
        int var8 = var14.field_75223_e;
        var9 = var14.field_75221_f;
        this.func_73733_a(var8, var9, var8 + 16, var9 + 16, -2130706433, -2130706433);
        GL11.glEnable(2896);
        GL11.glEnable(2929);
      }
    }

    this.func_74189_g(p_73863_1_, p_73863_2_);
    InventoryPlayer var15 = this.field_73882_e.field_71439_g.field_71071_by;
    ItemStack var16 = this.field_85050_q == null ? var15.func_70445_o() : this.field_85050_q;
    if (var16 != null) {
      byte var18 = 8;
      var9 = this.field_85050_q == null ? 8 : 16;
      if (this.field_85050_q != null && this.field_90018_r) {
        var16 = var16.func_77946_l();
        var16.field_77994_a = MathHelper.func_76123_f((float) var16.field_77994_a / 2.0F);
      }

      this.func_85044_b(var16, p_73863_1_ - var4 - var18, p_73863_2_ - var5 - var9);
    }

    if (this.field_85045_v != null) {
      float var17 = (float) (Minecraft.func_71386_F() - this.field_85046_u) / 100.0F;
      if (var17 >= 1.0F) {
        var17 = 1.0F;
        this.field_85045_v = null;
      }

      var9 = this.field_85047_t.field_75223_e - this.field_85049_r;
      int var10 = this.field_85047_t.field_75221_f - this.field_85048_s;
      int var11 = this.field_85049_r + (int) ((float) var9 * var17);
      int var12 = this.field_85048_s + (int) ((float) var10 * var17);
      this.func_85044_b(this.field_85045_v, var11, var12);
    }

    if (var15.func_70445_o() == null
        && this.field_82320_o != null
        && this.field_82320_o.func_75216_d()) {
      ItemStack var19 = this.field_82320_o.func_75211_c();
      this.func_74184_a(var19, p_73863_1_ - var4 + 8, p_73863_2_ - var5 + 8);
    }

    GL11.glPopMatrix();
    GL11.glEnable(2896);
    GL11.glEnable(2929);
    RenderHelper.func_74519_b();
  }
 @SideOnly(Side.CLIENT)
 public Packet107CreativeSetSlot(int p_i1461_1_, ItemStack p_i1461_2_) {
   this.field_73385_a = p_i1461_1_;
   this.field_73384_b = p_i1461_2_ != null ? p_i1461_2_.func_77946_l() : null;
 }