Bayern, Maximilian Emanuel in