We present hydrodynamical N-body simulations of clusters of galaxies with feedback taken from semi-analytic models of galaxy formation. The advantage of this technique is that the source of feedback in our simulations is a population of galaxies that closely resembles that found in the real universe. We demonstrate that, to achieve the high entropy levels found in clusters, active galactic nuclei must inject a large fraction of their energy into the intergalactic/intracluster media throughout the growth period of the central black hole. These simulations reinforce the argument of Bower et al., who arrived at the same conclusion on the basis of purely semi-analytic reasoning.