Dust and gas energetics are incorporated into a cluster-scale simulation of star formation in order to study the effect of heating and cooling on the star formation process. We build on our previous work by calculating separately the dust and gas temperatures. The dust temperature is set by radiative equilibrium between heating by embedded stars and radiation from dust. The gas temperature is determined using an energy-rate balance algorithm which includes molecular cooling, dust-gas collisional energy transfer, and cosmic-ray ionization. The fragmentation proceeds roughly similarly to simulations in which the gas temperature is set to the dust temperature, but there are differences. The structure of regions around sink particles have properties similar to those of Class 0 objects, but the infall speeds and mass accretion rates were, on average, higher than those seen for regions forming only low-mass stars. The gas and dust temperature have complex distributions not well modeled by approximations that ignore the detailed thermal physics. There is no simple relationship between density and kinetic temperature. In particular, high density regions have a large range of temperatures, determined by their location relative to heating sources. The total luminosity underestimates the star formation rate at these early stages, before ionizing sources are included, by an order of magnitude. As predicted in our previous work, a larger number of intermediate mass objects form when improved thermal physics is included, but the resulting IMF still has too few low mass stars. However, if we consider recent evidence on core-to-star efficiencies, the match to the IMF is improved.