SAN FRANCISCO — Kristaps Porzingis hung around for about another hour after practice, lifting weights and shooting with a contraption attached to the inside of the rim.

The purpose of this extra rim, as Porzingis explained, was to make the hoop smaller, to increase his chance for error. It’s a vehicle to busting out of a slump that has consumed the 22-year-old’s game since 2017, which also represents the last year Porzingis scored at least 30 points in a game.

The next test will undoubtedly test all boundaries of error, since perfection might not even be good enough for victory Tuesday against Draymond Green and a motivated Warriors team on two days’ rest.

“It helps for precision,” Porzingis said of the extra rim, adding later, “I want to shoot the ball better. I think it’s more just me forcing things. Now I’m trying to get better shots, just better looks. Also, this can help from a precision, there are open looks that I’ve missed. I want to get better. Just whatever I can do to be better.”

Once a lock to make his first All-Star game, Porzingis will now have to wait for the announcement Tuesday to see if the coaches voted him in as a reserve. He has competition as one of 10 strong candidates vying for seven spot.

Following that announcement, Porzingis will face his tormenter, Green, who has pounded the Latvian on the court and taken shots at him through the media. After their previous matchup last season at Golden State, Green said he was extra juiced to beat Porzingis after learning that the Latvian said of the Warriors power forward, “I’m ready for him.”

“Keep that to yourself,” Green said after limiting Porzingis to eight points on 4-of-13 shooting that night. “Don’t let everybody know that you’re going after me. So I guess we’re going to go after each other and that’s fine. I think he’s a great player. I think he will continue to get better and better, but that made it real personal.”

Draymond Green has gotten the better of Kristaps Porzingis in the past.

(Ezra Shaw/Getty Images)

Porzingis addressed those comments for the first time Monday ahead of their rematch, saying his initial quote was taken out of context. He downplayed it all as an entertainment ploy.

“It was more just like me talking and you guys spin it one way and it sounded different. But it’s all good,” Porzingis said. “It’s just, that’s what makes it entertaining for the fans. They want to see those matchups. They want to see how this guy’s going to play against that guy, whatever. This just helped build that up.”

In four career matchups against Green, Porzingis is averaging 12 points and shooting a paltry 32 percent. Still, Porzingis stopped short of calling Green his most difficult matchup.

“There are a lot of good defenders in the league and a lot of good team defenses. So to say one guy in particular, I don’t know,” he said. “He’s solid. He’s solid. Obviously he was defensive player of the year for a reason. And they’re a top team.”

Jeff Hornacek said the Knicks will try to get Porzingis away from Green by setting screens.

“We don’t it to get into a wrestling match with Draymond, have him down there doing that,” the coach said. “But if we can get him into the open court a little bit, if we can set screens they will switch a lot of stuff. So maybe we’ll create some switches

where KP gets a different guy on him.”

Either way, the Warriors have enough weapons to beat the Knicks by 40 points if properly motivated — which they are following Saturday’s loss to the Rockets. Warriors coach Steve Kerr said Monday the game represents a “key point in the year where we have to hit the reset button in terms of our priorities.”

“Right now is one of those times,” Kerr added. “This is an important week for us from the standpoint of we need to take care of the ball.”

The Warriors, by the way, have won nine of their last 11 games. If the Knicks did that, there’d be a parade down 33rd St. But for the Warriors, it’s incentive to push down the gas on the Knicks.

In other words, the rim is going to feel a lot smaller. Porzingis was preparing.

“I wish to get to that type of level they’re at,” he said. “That’s the goal.”