From 21e40a5fb39b39900b9e7d3c93697ba36e8b71e7 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Sat, 3 May 2014 19:20:54 -0500 Subject: [PATCH] Fix failure ghost contents when breaking an inventory on a storage bus. --- parts/misc/PartStorageBus.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/parts/misc/PartStorageBus.java b/parts/misc/PartStorageBus.java index fe3ad25bb..f004d0f8c 100644 --- a/parts/misc/PartStorageBus.java +++ b/parts/misc/PartStorageBus.java @@ -151,6 +151,14 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC private void resetCache(boolean fullReset) { + if ( monitor != null ) + monitor.onTick(); + + IMEInventory in = getHandler(); + IItemList 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 out = getHandler(); + IItemList after = AEApi.instance().storage().createItemList(); + if ( out != null ) + after = out.getAvailableItems( after ); + + Platform.postListChanges( before, after, this, mySrc ); } @Override