Fixed bug where the GUI didn't close when a block is broken, causing a dupe bug with the Portable Grid, fixes #1275
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user