int maxSize = stack.getMaxStackSize();
stack.stackSize = remove(par1ItemStack, maxSize);
if (stack.stackSize != 0) {
if (inv.isItemValidForSlot(slot, stack) && (!(inv instanceof ISidedInventory) || ((ISidedInventory) inv).canInsertItem(slot, stack, par7))) {
inv.setInventorySlotContents(slot, stack);
inv.markDirty();
set = true;
}
}
} else if (stackInSlot.getItem() == Item.getItemFromBlock(bBlock) && stackInSlot.getItemDamage() == bmeta) {
int maxSize = stackInSlot.getMaxStackSize();