Jesus compares the thoughts of a person to his good or evil treasure. When a good person has good thoughts, he engages in good actions. When an evil person thinks evil thoughts, he engages in evil actions. (See: [[rc://en/ta/man/translate/figs-metaphor]])
Here the good thoughts of a person are spoken of as if they are treasures stored in the heart of that person, and "his heart" is a metonym for the person's inner being. Alternate translation: "the good things he keeps deep inside himself" or "the good things he values very intensely" (See: [[rc://en/ta/man/translate/figs-metaphor]] and [[rc://en/ta/man/translate/figs-metonymy]])
Producing what is good is a metaphor for doing what is good. Alternate translation: "does what is good" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Here the evil thoughts of a person are spoken of as if they are evil things stored in the heart of that person, and "his heart" is a metonym the person's inner being. Alternate translation: "the evil things he keeps deep inside himself" or "the evil things he values very intensely" (See: [[rc://en/ta/man/translate/figs-metaphor]]) (See: [[rc://en/ta/man/translate/figs-metonymy]])
Here "heart" represents the person's mind or inner being. The phrase "his mouth" represents the person as a whole. Alternate translation: "what he thinks in his heart affects what he says with his mouth" or "a person will speak aloud what truly values inside of himself" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-synecdoche]])