Next-generation 5G New Radio (NR) cellular networks operating at mmWave frequencies are targeted to support diverse use cases, such as enhanced Mobile Broadband (eMBB), massive machine-type communications (mMTC), ultra-reliable and low latency communications (URLLC), etc. Energy-Efficiency is one of the key performance indicators for NR technology. User Equipment (UE) battery life significantly impacts the Quality of Experience (QoE) of the UE. Thus 5G NR standard is designed to have great flexibility on network operation modes to adapt to different requirements and trade-offs. 3GPP, in its 5G technical specification release, has proposed various power-saving schemes such as connected mode Discontinuous Reception (cDRX), RRC INACTIVE state, etc. In this work, we discuss the implementation and analysis of UE RRC state-based energy consumption module, including different power saving schemes in ns-3. We have thoroughly evaluated the module with the simulation study and validated the implementation with the 3GPP standards. The implementation source code is publicly available as open-source.