diff --git a/src/main/java/com/klikli_dev/occultism/client/gui/storage/StorageControllerGuiBase.java b/src/main/java/com/klikli_dev/occultism/client/gui/storage/StorageControllerGuiBase.java index d4bd912ee..392091d40 100644 --- a/src/main/java/com/klikli_dev/occultism/client/gui/storage/StorageControllerGuiBase.java +++ b/src/main/java/com/klikli_dev/occultism/client/gui/storage/StorageControllerGuiBase.java @@ -76,6 +76,7 @@ public abstract class StorageControllerGuiBase stacks; public List linkedMachines; public IStorageControllerContainer storageControllerContainer; @@ -547,7 +548,10 @@ protected void drawItems(GuiGraphics guiGraphics, float partialTicks, int mouseX var changedStacksToDisplay = this.lastCachedStacksToDisplayCount != stacksToDisplay.size(); this.lastCachedStacksToDisplayCount = stacksToDisplay.size(); - if(changedPage || changedStacksToDisplay){ + var changedStacks = this.lastStacksCount != this.stacks.size(); + this.lastStacksCount = this.stacks.size(); + + if(changedPage || changedStacksToDisplay || changedStacks){ this.sortItemStacks(stacksToDisplay); this.buildPage(stacksToDisplay); this.buildItemSlots(stacksToDisplay);