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
@@ -33,7 +33,7 @@ import appeng.api.config.FuzzyMode;
import appeng.api.storage.ICellInventoryHandler;
import appeng.api.storage.ICellWorkbenchItem;
import appeng.api.storage.IMEInventoryHandler;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.channels.IItemStorageChannel;
import appeng.items.AEBaseItem;
import appeng.items.contents.CellConfig;
@@ -80,7 +80,8 @@ public class ItemCreativeStorageCell extends AEBaseItem implements ICellWorkbenc
@Override
public void addCheckedInformation( final ItemStack stack, final World world, final List<String> lines, final ITooltipFlag advancedTooltips )
{
final IMEInventoryHandler<?> inventory = AEApi.instance().registries().cell().getCellInventory( stack, null, StorageChannel.ITEMS );
final IMEInventoryHandler<?> inventory = AEApi.instance().registries().cell().getCellInventory( stack, null,
AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
if( inventory instanceof ICellInventoryHandler )
{