Fixed some storage bus related crashes.

Fixed an issue where the storage might access inventories that have been removed from the world.
Fixed an issue caused by refactoring.
This commit is contained in:
AlgorithmX2
2014-07-23 23:20:16 -05:00
parent 42b6647ec3
commit 2b6cca0267
5 changed files with 22 additions and 14 deletions
+2 -2
View File
@@ -25,13 +25,13 @@ public class MEInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHa
public AccessRestriction myAccess = AccessRestriction.READ_WRITE;
public IPartitionList<T> myPartitionList = new DefaultPriorityList<T>();
public MEInventoryHandler(IMEInventory<T> i, StorageChannel channel ) {
public MEInventoryHandler(IMEInventory<T> i, StorageChannel channel) {
this.channel = channel;
if ( i instanceof IMEInventoryHandler )
internal = (IMEInventoryHandler<T>) i;
else
internal = new MEPassthru<T>( i );
internal = new MEPassthru<T>( i, channel );
monitor = internal instanceof IMEMonitor ? (IMEMonitor<T>) internal : null;
}