diff --git a/CHANGELOG.md b/CHANGELOG.md index 7196c8036..7294f103e 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,10 @@ ### 1.4.11 - Removed debug log configuration option, as it's no longer needed (raoulvdberge) -- Fixed bug where storages that are removed remain visible (raoulvdberge) -- Added support for External Storage on Interfaces and other Refined Storage blocks, so you can keep items in stock easier (raoulvdberge) - Removed "autocraft on redstone signal" option in the Crafter, use an External Storage in combination with an Interface with the Crafting Upgrade instead (raoulvdberge) +- Fixed bug where storages that are removed remain visible (raoulvdberge) +- Fixed bug where the GUI didn't close when a block is broken, causing a dupe bug with the Portable Grid (raoulvdberge) +- Added support for External Storage on Interfaces and other Refined Storage blocks, so you can keep items in stock easier (raoulvdberge) ### 1.4.10 - Improved performance of network scanning (raoulvdberge) diff --git a/src/main/java/com/raoulvdberge/refinedstorage/block/BlockBase.java b/src/main/java/com/raoulvdberge/refinedstorage/block/BlockBase.java index dd07f4f19..51ce09e8e 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/block/BlockBase.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/block/BlockBase.java @@ -5,6 +5,7 @@ import com.raoulvdberge.refinedstorage.RSUtils; import com.raoulvdberge.refinedstorage.api.network.node.INetworkNode; import com.raoulvdberge.refinedstorage.api.network.node.INetworkNodeProxy; import com.raoulvdberge.refinedstorage.api.network.security.Permission; +import com.raoulvdberge.refinedstorage.container.ContainerBase; import com.raoulvdberge.refinedstorage.integration.mcmp.IntegrationMCMP; import com.raoulvdberge.refinedstorage.integration.mcmp.RSMCMPAddon; import com.raoulvdberge.refinedstorage.item.ItemBlockBase; @@ -114,6 +115,12 @@ public abstract class BlockBase extends Block { public void breakBlock(World world, BlockPos pos, IBlockState state) { dropContents(world, pos); removeTile(world, pos, state); + + for (EntityPlayer player : world.playerEntities) { + if (player.openContainer instanceof ContainerBase && ((ContainerBase) player.openContainer).getTile() != null && ((ContainerBase) player.openContainer).getTile().getPos().equals(pos)) { + player.closeScreen(); + } + } } protected void removeTile(World world, BlockPos pos, IBlockState state) {