From 24283ae03c9da8e9329e094fb9df270085c8f73a Mon Sep 17 00:00:00 2001 From: alpha Date: Wed, 11 Dec 2024 02:13:56 -0600 Subject: [PATCH] Pass in old block state, this should prevent the block state from being air --- src/main/java/slimeknights/mantle/block/InventoryBlock.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/slimeknights/mantle/block/InventoryBlock.java b/src/main/java/slimeknights/mantle/block/InventoryBlock.java index d264764a..a7122232 100644 --- a/src/main/java/slimeknights/mantle/block/InventoryBlock.java +++ b/src/main/java/slimeknights/mantle/block/InventoryBlock.java @@ -103,11 +103,11 @@ public MenuProvider getMenuProvider(BlockState state, Level worldIn, BlockPos po @Override public void onRemove(BlockState state, Level worldIn, BlockPos pos, BlockState newState, boolean isMoving) { if (state.getBlock() != newState.getBlock()) { - Storage inventory = ItemStorage.SIDED.find(worldIn, pos, null); - if (inventory != null) + Storage inventory = ItemStorage.SIDED.find(worldIn, pos, state, null, null); + if (inventory != null) { dropInventoryItems(state, worldIn, pos, inventory); - if (worldIn.getBlockEntity(pos) != null) worldIn.updateNeighbourForOutputSignal(pos, this); + } } super.onRemove(state, worldIn, pos, newState, isMoving);