You can convert pleasure into pain and pain into pleasure by thinking, by Bhavana , by imagination. Many vegetarian students who have gone to England to prosecute their studies have become inveterate meat-eaters. Meat was very repulsive to them when they were in India. Mere sight used to induce vomiting. By simple change in thinking.
Ignorant persons attribute their pleasure to external objects.
That is a serious blunder, indeed. Really, there is no pleasure in objects. There is neither pleasure nor pain in objects. It is all mental creation, mental perception, mental jugglery. It is only the mental attitude or a certain kind of mental behaviour towards objects that bring joy or grief, pleasure or pain.