I personally interpreted it as:
Everything/anything a person does is with the intention to either maximize pleasure or to reduce pain or a combination of both.
- "with the intention to" being independent of what actually happens. For example, you can still get an answer wrong on a test "with the intention" of getting it right.
- I didn't see "maximize pleasure" or "reduce pain" as necessarily referring to a specific person or necessarily referring to only physical pleasure. For example, dying for your child might be done with the intention of maximizing the pleasure for your conscience. The physical pain from burning would be interpreted as less pain than the emotional pain of not rushing to rescue your child.
I might also insert in there "one's perception
of what maximizes pleasure and reduces pain." Or replace "pleasure" and "pain" with "benefits" and "detriments," just to generalize everything more.
That's how everything seemed congruent to me (though, and it was already mentioned, you never know if that'd apply to enlightened folk and such).
But yeah, just an interpretation.