package info.u_team.u_team_core.container;

import info.u_team.u_team_core.inventory.UItemStackHandler;
import net.minecraftforge.items.*;

public class ItemSlot extends SlotItemHandler {
	
	private final IItemHandler itemHandler;
	private final int index;
	
	public ItemSlot(IItemHandler itemHandler, int index, int x, int y) {
		super(itemHandler, index, x, y);
		this.itemHandler = itemHandler;
		this.index = index;
	}
	
	@Override
	public void onSlotChanged() {
		if (itemHandler instanceof UItemStackHandler) {
			((UItemStackHandler) itemHandler).onContentsChanged(index);
		}
	}
	
}

Add item slot with the IItemHandler that calls the onSlotChanged method
Add item slot with the IItemHandler that calls the onSlotChanged method