Skip to content

Commit

Permalink
Pass in old block state, this should prevent the block state from bei…
Browse files Browse the repository at this point in the history
…ng air
  • Loading branch information
AlphaMode committed Dec 11, 2024
1 parent e6542bb commit 24283ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/slimeknights/mantle/block/InventoryBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<ItemVariant> inventory = ItemStorage.SIDED.find(worldIn, pos, null);
if (inventory != null)
Storage<ItemVariant> 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);
Expand Down

0 comments on commit 24283ae

Please sign in to comment.