package info.u_team.u_team_core.inventory;

import net.minecraft.inventory.ItemStackHelper;
import net.minecraft.nbt.CompoundNBT;
import net.minecraftforge.items.ItemStackHandler;

public class UItemStackHandler extends ItemStackHandler {
	
	public UItemStackHandler(int size) {
		super(size);
	}
	
	@Override
	public void setSize(int size) {
		throw new UnsupportedOperationException();
	}
	
	@Override
	public CompoundNBT serializeNBT() {
		final CompoundNBT compound = new CompoundNBT();
		ItemStackHelper.saveAllItems(compound, stacks, false);
		return compound;
	}
	
	@Override
	public void deserializeNBT(CompoundNBT compound) {
		ItemStackHelper.loadAllItems(compound, stacks);
		onLoad();
	}
}

@@ -39,16 +39,79 @@
 ory;%0D%0A%0D%0A
+import info.u_team.u_team_core.api.item.IExtendedItemHandler;%0D%0A
 import n
@@ -299,16 +299,48 @@
 Handler 
+implements IExtendedItemHandler 
 %7B%0D%0A%09%0D%0A%09p

Add IExtendedItemHandler to UItemStackHandler