}
}
if ( o == null )
{
throw new AppEngException( "ItemStack was used as a cell, but was not a cell!" );
}
CellType = null;
i = o;
Item type = i.getItem();
if ( type instanceof IStorageCell )
{
CellType = (IStorageCell) i.getItem();
MAX_ITEM_TYPES = CellType.getTotalTypes( i );
}
if ( CellType == null )
{
throw new AppEngException( "ItemStack was used as a cell, but was not a cell!" );
}
if ( !CellType.isStorageCell( i ) )
{
throw new AppEngException( "ItemStack was used as a cell, but was not a cell!" );
}
if ( MAX_ITEM_TYPES > 63 )
MAX_ITEM_TYPES = 63;
if ( MAX_ITEM_TYPES < 1 )