Refactor Some Class stuff out in favor of StorageChannel.

This commit is contained in:
AlgorithmX2
2014-07-23 14:11:12 -05:00
parent e1fe66adf9
commit 298ae41198
13 changed files with 24 additions and 26 deletions
+4 -4
View File
@@ -16,7 +16,7 @@ import appeng.util.prioitylist.IPartitionList;
public class MEInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHandler<T>
{
Class<? extends IAEStack> clz;
final StorageChannel channel;
final protected IMEMonitor<T> monitor;
final protected IMEInventoryHandler<T> internal;
@@ -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, Class<? extends IAEStack> cla) {
clz = cla;
public MEInventoryHandler(IMEInventory<T> i, StorageChannel channel ) {
this.channel = channel;
if ( i instanceof IMEInventoryHandler )
internal = (IMEInventoryHandler<T>) i;
else
internal = new MEPassthru<T>( i, clz );
internal = new MEPassthru<T>( i );
monitor = internal instanceof IMEMonitor ? (IMEMonitor<T>) internal : null;
}