As soon as you find your thoughts deflecting to the path of material desires, switch them immediately back to the path of preserving your essential nature.
The opening chapter of Journey to the West quotes a verse by Shao Kangjie (Shao Yong) from his Huangji Jingshi (Supreme Principles Governing the World).