}
protected void stockBallast() {
EntityMinecart link = LinkageManager.instance().getLinkedCartA(this);
if (link instanceof IItemTransfer) {
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);
InvTools.moveItemStack(stack, invBallast);
return;
}
}
}