public void func_70455_b(InventoryPlayer p_70455_1_) { int var2; for (var2 = 0; var2 < this.field_70462_a.length; ++var2) { this.field_70462_a[var2] = ItemStack.func_77944_b(p_70455_1_.field_70462_a[var2]); } for (var2 = 0; var2 < this.field_70460_b.length; ++var2) { this.field_70460_b[var2] = ItemStack.func_77944_b(p_70455_1_.field_70460_b[var2]); } }
public boolean func_70441_a(ItemStack p_70441_1_) { int var2; if (p_70441_1_.func_77951_h()) { var2 = this.func_70447_i(); if (var2 >= 0) { this.field_70462_a[var2] = ItemStack.func_77944_b(p_70441_1_); this.field_70462_a[var2].field_77992_b = 5; p_70441_1_.field_77994_a = 0; return true; } else if (this.field_70458_d.field_71075_bZ.field_75098_d) { p_70441_1_.field_77994_a = 0; return true; } else { return false; } } else { do { var2 = p_70441_1_.field_77994_a; p_70441_1_.field_77994_a = this.func_70452_e(p_70441_1_); } while (p_70441_1_.field_77994_a > 0 && p_70441_1_.field_77994_a < var2); if (p_70441_1_.field_77994_a == var2 && this.field_70458_d.field_71075_bZ.field_75098_d) { p_70441_1_.field_77994_a = 0; return true; } else { return p_70441_1_.field_77994_a < var2; } } }
private int func_70452_e(ItemStack p_70452_1_) { int var2 = p_70452_1_.field_77993_c; int var3 = p_70452_1_.field_77994_a; int var4; if (p_70452_1_.func_77976_d() == 1) { var4 = this.func_70447_i(); if (var4 < 0) { return var3; } else { if (this.field_70462_a[var4] == null) { this.field_70462_a[var4] = ItemStack.func_77944_b(p_70452_1_); } return 0; } } else { var4 = this.func_70432_d(p_70452_1_); if (var4 < 0) { var4 = this.func_70447_i(); } if (var4 < 0) { return var3; } else { if (this.field_70462_a[var4] == null) { this.field_70462_a[var4] = new ItemStack(var2, 0, p_70452_1_.func_77960_j()); if (p_70452_1_.func_77942_o()) { this.field_70462_a[var4].func_77982_d( (NBTTagCompound) p_70452_1_.func_77978_p().func_74737_b()); } } int var5 = var3; if (var3 > this.field_70462_a[var4].func_77976_d() - this.field_70462_a[var4].field_77994_a) { var5 = this.field_70462_a[var4].func_77976_d() - this.field_70462_a[var4].field_77994_a; } if (var5 > this.func_70297_j_() - this.field_70462_a[var4].field_77994_a) { var5 = this.func_70297_j_() - this.field_70462_a[var4].field_77994_a; } if (var5 == 0) { return var3; } else { var3 -= var5; this.field_70462_a[var4].field_77994_a += var5; this.field_70462_a[var4].field_77992_b = 5; return var3; } } } }
public void func_72472_a(Packet15Place p_72472_1_) { WorldServer var2 = this.field_72573_d.func_71218_a(this.field_72574_e.field_71093_bK); ItemStack var3 = this.field_72574_e.field_71071_by.func_70448_g(); boolean var4 = false; int var5 = p_72472_1_.func_73403_d(); int var6 = p_72472_1_.func_73402_f(); int var7 = p_72472_1_.func_73407_g(); int var8 = p_72472_1_.func_73401_h(); if (p_72472_1_.func_73401_h() == 255) { if (var3 == null) { return; } this.field_72574_e.field_71134_c.func_73085_a(this.field_72574_e, var2, var3); } else if (p_72472_1_.func_73402_f() >= this.field_72573_d.func_71207_Z() - 1 && (p_72472_1_.func_73401_h() == 1 || p_72472_1_.func_73402_f() >= this.field_72573_d.func_71207_Z())) { this.field_72574_e.field_71135_a.func_72567_b( new Packet3Chat( "" + EnumChatFormatting.GRAY + "Height limit for building is " + this.field_72573_d.func_71207_Z())); var4 = true; } else { if (this.field_72587_r && this.field_72574_e.func_70092_e( (double) var5 + 0.5D, (double) var6 + 0.5D, (double) var7 + 0.5D) < 64.0D && !this.field_72573_d.func_96290_a(var2, var5, var6, var7, this.field_72574_e)) { this.field_72574_e.field_71134_c.func_73078_a( this.field_72574_e, var2, var3, var5, var6, var7, var8, p_72472_1_.func_73406_j(), p_72472_1_.func_73404_l(), p_72472_1_.func_73408_m()); } var4 = true; } if (var4) { this.field_72574_e.field_71135_a.func_72567_b( new Packet53BlockChange(var5, var6, var7, var2)); if (var8 == 0) { --var6; } if (var8 == 1) { ++var6; } if (var8 == 2) { --var7; } if (var8 == 3) { ++var7; } if (var8 == 4) { --var5; } if (var8 == 5) { ++var5; } this.field_72574_e.field_71135_a.func_72567_b( new Packet53BlockChange(var5, var6, var7, var2)); } var3 = this.field_72574_e.field_71071_by.func_70448_g(); if (var3 != null && var3.field_77994_a == 0) { this.field_72574_e .field_71071_by .field_70462_a[this.field_72574_e.field_71071_by.field_70461_c] = null; var3 = null; } if (var3 == null || var3.func_77988_m() == 0) { this.field_72574_e.field_71137_h = true; this.field_72574_e .field_71071_by .field_70462_a[this.field_72574_e.field_71071_by.field_70461_c] = ItemStack.func_77944_b( this.field_72574_e .field_71071_by .field_70462_a[this.field_72574_e.field_71071_by.field_70461_c]); Slot var9 = this.field_72574_e.field_71070_bA.func_75147_a( this.field_72574_e.field_71071_by, this.field_72574_e.field_71071_by.field_70461_c); this.field_72574_e.field_71070_bA.func_75142_b(); this.field_72574_e.field_71137_h = false; if (!ItemStack.func_77989_b( this.field_72574_e.field_71071_by.func_70448_g(), p_72472_1_.func_73405_i())) { this.func_72567_b( new Packet103SetSlot( this.field_72574_e.field_71070_bA.field_75152_c, var9.field_75222_d, this.field_72574_e.field_71071_by.func_70448_g())); } } }