API"ed the Storage Cell Classes.

This commit is contained in:
AlgorithmX2
2014-03-27 19:48:38 -05:00
parent a5379c82f8
commit 404cc08128
6 changed files with 44 additions and 15 deletions
+8 -5
View File
@@ -8,6 +8,8 @@ import appeng.api.config.FuzzyMode;
import appeng.api.config.IncludeExclude;
import appeng.api.config.Upgrades;
import appeng.api.implementations.items.IUpgradeModule;
import appeng.api.storage.ICellInventory;
import appeng.api.storage.ICellInventoryHandler;
import appeng.api.storage.IMEInventory;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList;
@@ -16,28 +18,29 @@ import appeng.util.item.AEItemStack;
import appeng.util.prioitylist.FuzzyPriorityList;
import appeng.util.prioitylist.PrecisePriorityList;
public class CellInventoryHandler extends MEInventoryHandler<IAEItemStack>
public class CellInventoryHandler extends MEInventoryHandler<IAEItemStack> implements ICellInventoryHandler
{
NBTTagCompound openNbtData()
{
return Platform.openNbtData( getCellInv().i );
return Platform.openNbtData( getCellInv().getItemStack() );
}
public CellInventory getCellInv()
@Override
public ICellInventory getCellInv()
{
Object o = this.internal;
if ( o instanceof MEPassthru )
o = ((MEPassthru) o).getInternal();
return (CellInventory) (o instanceof CellInventory ? o : null);
return (ICellInventory) (o instanceof ICellInventory ? o : null);
}
CellInventoryHandler(IMEInventory c) {
super( c, IAEItemStack.class );
CellInventory ci = getCellInv();
ICellInventory ci = getCellInv();
if ( ci != null )
{
IItemList<IAEItemStack> priorityList = AEApi.instance().storage().createItemList();