The California Legislature, in a blunt challenge to the state supreme court, is moving to enact legislation to require mandatory prison sentences for a wide variety of crimes.

The measure, which public officials here say paves the way for a confrontation between the way for a confrontation between the legislature and the judiciary, is in response to a 4-to-3 decision of the state high court emasculating a California law requiring prison sentences for those using guns in commission of a crime.

The pending measure, which legislators say will pass in a matter of weeks and be quickly signed into law by Gov. Edmund G. (Jerry) Brown Jr; would restore the mandatory gun law in a more tightly defined fashion.

It also anticipates further court decisions by requiring mandatory prison sentences for those convicted of assaulting an aged, disabled or elderly person, or sellers of more than half an ounce of heroin and for those charged with prior conviction for various offenses.

"A confrontation between the legislative and judicial branches is now inevitable," predicts Assemblyman Bill McVittie, a moderate Democrat who heads one of the committees processing the new mandatory-sentencing proposal.

This confrontation comes against the backdrop of an investigation by the California Commission on Judicial Performance into whether the state supreme court majority suppressed until after November's election a decision striking down the politically popular "use a gun, go to prison" law. Critics of the court charge that the decision was withheld in an effort to help controversial Chief Justice Rose Bird win confirmation by the voters.

Bird, a former member of Brown's cabinet and the state's first woman justice, narrowly survived the confirmation vote.

Late last month, Bird's doctors announced that she had undergone surgery for the removal of a tiny cancerous growth under her right arm, the second time in two years she has undergone cancer surgery. While the operation was pronounced a success, some friends of Bird believe she is in poor health and ultimately may quit the court.

"Rose is a fighter, and would never leave under a cloud," says one knowledgeable friend. "But I think it is quite possible she will step down if the investigation is resolved in her favor and the new legislation is passed without demagogic attacks on her or on the court."

There have been no such attacks by Assembly Speaker Leo T. McCarthy or state Sen. Jerry Smith, the authors of the two major mandatory sentencing bills. Both are Democratic liberals who supported Bird's confirmation.

Nevertheless, the legislative hearings on the issue have produced attitudes ranging from bewilderment to contempt for the high court's reasoning on the case it overturned.

The odd case on which the court reached its decision involved a 27-year-old security guard, Harold Tanner, who sought to convince a convenience store chain to reemploy his security service by the unique method of holding up a store at gunpoint to demonstrate that it had poor security.

The trial judge circumvented the mandatory law by striking from the charge at the time of sentencing the statement that Tanner had used a gun. He gave Tanner probation and nine months in county jail instead of the three-to-five-year prison sentence that the law intended.

An appeals court overruled the judge, but the state supreme court upheld him, with the majority saying that the legislature had not expressly repealed an 1872 statute that allowed widespread judicial discretion.

Bird argued in a separate opinion that the legislature was violating the court's "inherent" power by following its usual practice of setting penalties for crimes.

While no other justice supported Bird. the legislature fears that the court in future cases might attempt to use this reasoning to invalidate the pending mandatory prison law. If this happens, legislators say, a state constitutional initiative restricting the court's power is inevitable.

The current mood in the legislature probably was best expressed by newly installed Republican Attorney General George Deukmejian, a former state senator from Long Beach who was the author of the mandatory prison law struck down by the court.

"I don't think that our system can afford to have the courts legislate valid and needed legislation out of existence," Deukmejian testified before his former senate colleagues.

Soon after this testimony the state senate judiciary committee approved the Smith bill without dissent. Legislative passage of either the nearly identical McCarthy or Smith bills is regarded as a foregone conclusion.

What is less clear is the outcome of the pending investigation of the court.

In an effort to avoid accusations of a whitewash, the Commission on Judicial Performance has requested the State Judicial Council, headed by Bird, to waive its usual rules and allow open hearings. This decision will not be made until Jan. 26, but the council's executive committee this week recommended closed hearings.

Reflecting a view widely held both by Bird's critics and supporters, Deukmejian said in an interview that closed hearings would further damage the court.

"If they don't conduct these proceedings in public, then I don't think anyone is going to have confidence in the conclusion of the inquiry," Deukmejian said.

Bird, who has said that any hearing will vindicate her, also has called for open hearings. However, it doesn't appear at this point that the judicial council is paying any more attention to her than is the legislature.