private boolean func_70350_k() { if (this.field_70359_a[3] != null && this.field_70359_a[3].field_77994_a > 0) { ItemStack var1 = this.field_70359_a[3]; if (!Item.field_77698_e[var1.field_77993_c].func_77632_u()) { return false; } else { boolean var2 = false; for (int var3 = 0; var3 < 3; ++var3) { if (this.field_70359_a[var3] != null && this.field_70359_a[var3].field_77993_c == Item.field_77726_bs.field_77779_bT) { int var4 = this.field_70359_a[var3].func_77960_j(); int var5 = this.func_70352_b(var4, var1); if (!ItemPotion.func_77831_g(var4) && ItemPotion.func_77831_g(var5)) { var2 = true; break; } List var6 = Item.field_77726_bs.func_77834_f(var4); List var7 = Item.field_77726_bs.func_77834_f(var5); if ((var4 <= 0 || var6 != var7) && (var6 == null || !var6.equals(var7) && var7 != null) && var4 != var5) { var2 = true; break; } } } return var2; } } else { return false; } }
private void func_70353_r() { if (this.func_70350_k()) { ItemStack var1 = this.field_70359_a[3]; for (int var2 = 0; var2 < 3; ++var2) { if (this.field_70359_a[var2] != null && this.field_70359_a[var2].field_77993_c == Item.field_77726_bs.field_77779_bT) { int var3 = this.field_70359_a[var2].func_77960_j(); int var4 = this.func_70352_b(var3, var1); List var5 = Item.field_77726_bs.func_77834_f(var3); List var6 = Item.field_77726_bs.func_77834_f(var4); if ((var3 <= 0 || var5 != var6) && (var5 == null || !var5.equals(var6) && var6 != null)) { if (var3 != var4) { this.field_70359_a[var2].func_77964_b(var4); } } else if (!ItemPotion.func_77831_g(var3) && ItemPotion.func_77831_g(var4)) { this.field_70359_a[var2].func_77964_b(var4); } } } if (Item.field_77698_e[var1.field_77993_c].func_77634_r()) { this.field_70359_a[3] = new ItemStack(Item.field_77698_e[var1.field_77993_c].func_77668_q()); } else { --this.field_70359_a[3].field_77994_a; if (this.field_70359_a[3].field_77994_a <= 0) { this.field_70359_a[3] = null; } } } }