Fix failure ghost contents when breaking an inventory on a storage bus.

This commit is contained in:
AlgorithmX2
2014-05-03 19:20:54 -05:00
parent 58763ef17f
commit 21e40a5fb3
+15
View File
@@ -151,6 +151,14 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
private void resetCache(boolean fullReset)
{
if ( monitor != null )
monitor.onTick();
IMEInventory<IAEItemStack> in = getHandler();
IItemList<IAEItemStack> before = AEApi.instance().storage().createItemList();
if ( in != null )
before = in.getAvailableItems( before );
cached = false;
if ( fullReset )
handlerHash = 0;
@@ -163,6 +171,13 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
{
// :3
}
IMEInventory<IAEItemStack> out = getHandler();
IItemList<IAEItemStack> after = AEApi.instance().storage().createItemList();
if ( out != null )
after = out.getAvailableItems( after );
Platform.postListChanges( before, after, this, mySrc );
}
@Override