diff --git a/src/main/java/com/buuz135/functionalstorage/block/tile/ControllableDrawerTile.java b/src/main/java/com/buuz135/functionalstorage/block/tile/ControllableDrawerTile.java index 86c194f..ff3bf05 100644 --- a/src/main/java/com/buuz135/functionalstorage/block/tile/ControllableDrawerTile.java +++ b/src/main/java/com/buuz135/functionalstorage/block/tile/ControllableDrawerTile.java @@ -98,8 +98,14 @@ public abstract class ControllableDrawerTile this.addInventory((InventoryComponent) this.storageUpgrades); } this.addInventory((InventoryComponent) (this.utilityUpgrades = new InventoryComponent>("utility_upgrades", 114, 70, 3) - .setInputFilter((stack, integer) -> stack.getItem() instanceof UpgradeItem && ((UpgradeItem) stack.getItem()).getType() == UpgradeItem.Type.UTILITY) - .setSlotLimit(1)) + .setInputFilter((stack, integer) -> stack.getItem() instanceof UpgradeItem && ((UpgradeItem) stack.getItem()).getType() == UpgradeItem.Type.UTILITY) + .setSlotLimit(1) + .setOnSlotChanged((itemStack, integer) -> { + if (controllerPos != null && this.level.getBlockEntity(controllerPos) instanceof DrawerControllerTile controllerTile) { + controllerTile.getConnectedDrawers().rebuild(); + } + }) + ) ); } diff --git a/src/main/java/com/buuz135/functionalstorage/block/tile/DrawerControllerTile.java b/src/main/java/com/buuz135/functionalstorage/block/tile/DrawerControllerTile.java index a04c7c1..1b32726 100644 --- a/src/main/java/com/buuz135/functionalstorage/block/tile/DrawerControllerTile.java +++ b/src/main/java/com/buuz135/functionalstorage/block/tile/DrawerControllerTile.java @@ -214,7 +214,7 @@ public class DrawerControllerTile extends ControllableDrawerTile(); if (level != null && !level.isClientSide()) { for (Long connectedDrawer : this.connectedDrawers) {