IItemTransfer tranfer = (IItemTransfer) link;
for (int slot = 0; slot < invBallast.getSizeInventory(); slot++) {
ItemStack stack = invBallast.getStackInSlot(slot);
if (stack != null && !BallastRegistry.isItemBallast(stack)) {
stack = tranfer.offerItem(this, stack);
invBallast.setInventorySlotContents(slot, stack);
return;
}
if (stack == null) {
stack = tranfer.requestItem(this, StackFilter.BALLAST);