HOUSTON — There was no champagne on ice for the Knicks in the locker room. There hasn’t been in a long time. But the fact that 2016 came to an end might have been cause for them to pop a bottle of bubbly.

For all the strides they made, the year ended badly for the Knicks. They can only hope that 2017 will be a better year — and a healthier one.

The Knicks were without Kristaps Porzingis because of a sore left Achilles and lost Carmelo Anthony for the second half with left knee soreness Saturday night. Despite an eye-popping, historic triple-double by James Harden — a career-high 53 points along with 17 assists and 16 rebounds — they were able to hang tough with the Rockets, but they closed out 2016 with their fourth straight loss, 129-122.

It was the seventh loss in the last nine games for the Knicks (16-17) — who cut a 19-point third-quarter deficit to three on six occasions in the fourth quarter — and dropped them below .500 for the first time since they were 6-7 on Nov. 20.

“Definitely disappointing,” Brandon Jennings said. “Not the way you want to end 2016.”

advertisement | advertise on newsday

The Knicks might have had a real shot to end this three-game trip with a victory if they could have slowed down Harden. But he dominated the game with an outing that Jennings compared to a video game performance.

It was the first time in NBA history that a player went for at least 50-15-15 in the same game, and Harden tied Wilt Chamberlain for the most points scored in a triple-double. “He did everything,” Derrick Rose said. “James is a hell of a player.”

Harden frustrated the Knicks in many ways, including how he drew fouls. He was fouled while attempting a three-pointer three different times. Jeff Hornacek said Harden initiates the contact and should be called for an offensive foul. “He has the ball in his right hand and he grabs his left arm around your hand,” Hornacek said. “To me, that’s an offensive foul. You can’t grab the other guy’s arm.”

Harden — who had 30 points, 13 rebounds and 10 assists Friday night against the Clippers — shot 14-for-26 overall, including 9-for-16 from three-point range, and was 16-for-18 from the foul line for the Rockets (26-9). They scored 42 points in the second quarter, including 29 in the final 5:49, with Harden scoring or assisting on 20 of them.

Harden ended the first half a rebound shy of a triple-double with 24 points, 10 assists and nine rebounds. He was 6-for-8 from three-point range.

Ryan Anderson added 25 for the Rockets, who shot 21-for-55 from three-point range.

Jennings scored 32 points and Rose had 21 for the Knicks. Joakim Noah had 15 points and 16 rebounds, Justin Holiday added 15 points and Mindaugas Kuzminskas had 14.

In addition to Porzingis and Anthony, the Knicks were without Courtney Lee, who missed his third straight game with a sore right wrist. Kyle O’Quinn sat out with flu-like symptoms.

Anthony’s knee already was sore after he banged it in Friday night’s loss to the Pelicans. He said he contemplated not playing, winced numerous times in the first half and never got in rhythm, shooting 3-for-11 and finishing with seven points. He and Porzingis expect to play Monday night against the Magic.

“The more I played and the more I ran, the sorer I got,” Anthony said. “It’s just sore. I don’t think it’s that serious. I don’t think it will be an issue come [January] second.”

advertisement | advertise on newsday

The Knicks fell behind 80-61 on Trevor Ariza’s dunk with 9:17 left in the third quarter, but Jennings made five of his first six shots in the quarter. His back-to-back three-pointers brought the Knicks within 88-80 with 3:52 left, and they got within 97-92 in the closing seconds of the quarter after Kuzminskas drilled two straight three-pointers.

“All we ask is go and play as hard as you can,” Hornacek said. “We had a chance.”

The Knicks trailed by only 114-111 after Noah’s tip-in, but Harden was fouled while attempting a three-pointer and made all three foul shots. He then found Anderson for a long jumper and a 119-111 lead with 3:37 left, and Houston went up by 10 on Ariza’s basket inside, all but putting an end to the Knicks’ hope for a Happy New Year.

“We know that we missed some guys, but it’s no excuses,” Rose said. “Losing these three kind of put a bad taste, it’s got to leave a bad taste in our mouths. We got to get things right.”