By how they receive their energy-we categorize animals, plants, fungus, and other organisms in food webs by the way that they receive their energy. producers are plants or algae and they receive their energy from the sun. herbivores receive their energy from eating producers/plants. omnivores receive their energy from eating either plants or animals. carnivores receive their energy from eating other animals. lastly, detritivores and decomposers receive their energy from dead and rotting things, an example of a decomposer would be a mushroom, earthworm, or bacterium.