See ch. vii. [Actions], iii. and xxiii.

If, by reason of the word relation, this part of the division should appear obscure, the unknown term may be got rid of in the following manner. Our ideas are derived, all of them, from the senses; pleasurable and painful ones, therefore, among the rest: consequently, from the operation of sensible objects upon our senses. A man's happiness, then, may be said to depend more or less upon the relation he bears to any sensible object, when such object is in a way that stands a chance, greater or less, of producing to him, or averting from him, pain or pleasure. Now this, if at all, it must do in one or other of two ways; 1. In an active way, properly so called; viz. by motion: or, 2. In a passive or quiescent way, by being moved to, or acted upon: and in either case, either, 1. in an immediate way, by acting upon, or being acted on by, the organs of sense, without the intervention of any other external object: or, 2. in a more or less remote way, by acting upon, or being acted on by, some other external object, which (with the intervention of a greater or less number of such objects, and at the end of nore or less considerable intervals of time) will come at length to act upon, or be acted upon by, those organs. And this is equally true, whether the external objects in question be things or persons. It is also equally true of pains and pleasures of the mind, as of those of the body: all the diference is, that in the production of these, the pleasure or pain may result mmediately from the perception which it accompanies: in the production of those of the mind, it cannot result from the action of an object of sense any otherwise than by association; to wit, by means of some connection which the perception has contracted with certain prior ones, lodged already in the memory. (See ch. v. [Pleasures and Pains], xv. xxxi. Ch. x. [Motives], xxxviii, note.)

IPML Chapter 16 Section 2 Part 1