@@ -0,0 +1,1657 @@
+package net.mcft.copy.core.inventory.util;%0A%0Aimport net.mcft.copy.core.inventory.InventoryWrapper;%0Aimport net.minecraft.inventory.IInventory;%0Aimport net.minecraft.item.ItemStack;%0A%0Apublic class InventoryCombined extends InventoryWrapper %7B%0A%09%0A%09public final IInventory%5B%5D inventories;%0A%09public final int size;%0A%09%0A%09private final int%5B%5D inventorySizes;%0A%09%0A%09public InventoryCombined(IInventory... inventories) %7B%0A%09%09super(inventories%5B0%5D);%0A%09%09this.inventories = inventories;%0A%09%09int size = 0;%0A%09%09inventorySizes = new int%5Binventories.length%5D;%0A%09%09for (int i = 0; i %3C inventories.length; i++)%0A%09%09%09size += (inventorySizes%5Bi%5D = inventories%5Bi%5D.getSizeInventory());%0A%09%09this.size = size;%0A%09%7D%0A%09%0A%09private int tempSlot;%0A%09private IInventory getInventoryAndSlot(int slot) %7B%0A%09%09tempSlot = slot;%0A%09%09for (int i = 0; ; i++) %7B%0A%09%09%09if (tempSlot %3C inventorySizes%5Bi%5D)%0A%09%09%09%09return inventories%5Bi%5D;%0A%09%09%09tempSlot -= inventorySizes%5Bi%5D;%0A%09%09%7D%0A%09%7D%0A%09%0A%09@Override%0A%09public int getSizeInventory() %7B return size; %7D%0A%09%0A%09@Override%0A%09public ItemStack getStackInSlot(int slot) %7B%0A%09%09return getInventoryAndSlot(slot).getStackInSlot(tempSlot);%0A%09%7D%0A%09@Override%0A%09public void setInventorySlotContents(int slot, ItemStack stack) %7B%0A%09%09getInventoryAndSlot(slot).setInventorySlotContents(tempSlot, stack);%0A%09%7D%0A%09%0A%09@Override%0A%09public ItemStack getStackInSlotOnClosing(int slot) %7B%0A%09%09return getInventoryAndSlot(slot).getStackInSlotOnClosing(tempSlot);%0A%09%7D%0A%09@Override%0A%09public ItemStack decrStackSize(int slot, int amount) %7B%0A%09%09return getInventoryAndSlot(slot).decrStackSize(tempSlot, amount);%0A%09%7D%0A%09%0A%09@Override%0A%09public boolean isItemValidForSlot(int slot, ItemStack stack) %7B%0A%09%09return getInventoryAndSlot(slot).isItemValidForSlot(tempSlot, stack);%0A%09%7D%0A%09%0A%7D%0A

Add InventoryCombined