Refactored StorageChannel enum into an interface (#3138)

This replaces the static enum with a more dynamic interface providing
factory methods for handling network storage.
This commit is contained in:
yueh
2017-10-08 17:59:30 +02:00
committed by GitHub
parent 8ad8ce68b5
commit 6e81f698c0
115 changed files with 1255 additions and 943 deletions
@@ -24,7 +24,7 @@ import appeng.api.config.Actionable;
import appeng.api.networking.security.IActionSource;
import appeng.api.storage.IMEInventory;
import appeng.api.storage.IMEInventoryHandler;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.IStorageChannel;
import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IItemList;
@@ -32,10 +32,10 @@ import appeng.api.storage.data.IItemList;
public class MEPassThrough<T extends IAEStack<T>> implements IMEInventoryHandler<T>
{
private final StorageChannel wrappedChannel;
private final IStorageChannel wrappedChannel;
private IMEInventory<T> internal;
public MEPassThrough( final IMEInventory<T> i, final StorageChannel channel )
public MEPassThrough( final IMEInventory<T> i, final IStorageChannel channel )
{
this.wrappedChannel = channel;
this.setInternal( i );
@@ -70,7 +70,7 @@ public class MEPassThrough<T extends IAEStack<T>> implements IMEInventoryHandler
}
@Override
public StorageChannel getChannel()
public IStorageChannel getChannel()
{
return this.internal.getChannel();
}
@@ -111,7 +111,7 @@ public class MEPassThrough<T extends IAEStack<T>> implements IMEInventoryHandler
return true;
}
StorageChannel getWrappedChannel()
IStorageChannel getWrappedChannel()
{
return this.wrappedChannel;
}