Over a comprehensive deliberation period, the Massachusetts Legislature struggled to bridge sustainable energy companies’ goals to expand their infrastructure with its own plan to transition from fossil fuels to Massachusetts’ new climate law — until Tuesday.