From 24b6e93951f32a19e87ffa74a1a241d6509cdc2c Mon Sep 17 00:00:00 2001 From: esmenard <53749130+esmenard@users.noreply.github.com> Date: Fri, 26 Dec 2025 23:13:04 +0100 Subject: [PATCH] Fix storage limit for Simple Compating Drawers with a downgrade The limit is lowered from 64*9*9 to 64*9 for Simple Compacting Drawers, while remaining 64*9*9 for Compacting Drawers --- .../inventory/CompactingInventoryHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/buuz135/functionalstorage/inventory/CompactingInventoryHandler.java b/src/main/java/com/buuz135/functionalstorage/inventory/CompactingInventoryHandler.java index 027af991..0c45dca0 100644 --- a/src/main/java/com/buuz135/functionalstorage/inventory/CompactingInventoryHandler.java +++ b/src/main/java/com/buuz135/functionalstorage/inventory/CompactingInventoryHandler.java @@ -147,7 +147,7 @@ public int getSlotLimit(int slot) { if (isCreative()) return Integer.MAX_VALUE; if (slot == this.slots) return Integer.MAX_VALUE; int total = totalAmount; - if (hasDowngrade()) total = 64 * 9 * 9; + if (hasDowngrade()) total = (slots == 2 ? 64 * 9 : 64 * 9 * 9); return (int) Math.min(Integer.MAX_VALUE, Math.floor( (double) (total * (long) getMultiplier()) / this.resultList.get(slot).getNeeded())); } @@ -155,7 +155,7 @@ public int getSlotLimit(int slot) { public int getSlotLimitBase(int slot) { if (slot == this.slots) return Integer.MAX_VALUE; int total = totalAmount; - if (hasDowngrade()) total = 64 * 9 * 9; + if (hasDowngrade()) total = (slots == 2 ? 64 * 9 : 64 * 9 * 9); return (int) Math.min(Integer.MAX_VALUE, Math.floor(total / this.resultList.get(slot).getNeeded())); }