Observed clusters of galaxies essentially come in two flavours: non-cool-core clusters characterized by an isothermal temperature profile and a central entropy floor, and cool-core clusters where temperature and entropy in the central region are increasing with radius. Using cosmological resimulations of a galaxy cluster, we study the evolution of its intracluster medium (ICM) gas properties, and through them we assess the effect of different (subgrid) modelling of the physical processes at play, namely gas cooling, star formation, feedback from supernovae and active galactic nuclei (AGNs). More specifically, we show that AGN feedback plays a major role in the pre-heating of the protocluster as it prevents a high concentration of mass from collecting in the centre of the future galaxy cluster at early times. However, AGN activity during the cluster’s later evolution is also required to regulate the mass flow into its core and prevent runaway star formation in the central galaxy. Whereas the energy deposited by supernovae alone is insufficient to prevent an overcooling catastrophe, supernovae are responsible for spreading a large amount of metals at high redshift, enhancing the cooling efficiency of the ICM gas. As the AGN energy release depends on the accretion rate of gas on to its central black hole engine, the AGNs respond to this supernova-enhanced gas accretion by injecting more energy into the surrounding gas, and as a result increase the amount of early pre-heating. We demonstrate that the interaction between an AGN jet and the ICM gas that regulates the growth of the AGN’s black hole can naturally produce cool-core clusters if we neglect metals. However, as soon as metals are allowed to contribute to the radiative cooling, only the non-cool-core solution is produced.