New Jersey lawmakers on Thursday passed legislation that will reshape the state’s energy future, setting in motion a 50% renewables target for 2030, giving a boost to what could become the state’s first offshore wind project, and approving controversial subsidies to keep several big nuclear plants running.

The legislation also sets a 2GW target for energy storage by 2030, with an interim 600MW target for 2021.