Create

Create

86M Downloads

Change the ItemStack in the CountedItemStackList Constructor

BeneHenke opened this issue ยท 0 comments

commented

Currently the Display Link does not work with mods that increase the stack size in chests like Sophisticated Storage.
To get the right number of items the extractItem value could be changed to use the inventory.getStackInSlot(slot); method as this one does not check the max stack size of the item. This has worked for me but I am not sure if there is a reason to use inventory.extractItem(slot, inventory.getSlotLimit(slot), true).

public CountedItemStackList(IItemHandler inventory, FilteringBehaviour filteringBehaviour) {
        for (int slot = 0; slot < inventory.getSlots(); slot++) {
            //ItemStack extractItem = inventory.extractItem(slot, inventory.getSlotLimit(slot), true);
            ItemStack extractItem = inventory.getStackInSlot(slot);

            if (filteringBehaviour.test(extractItem))
                add(extractItem);
        }
    }