He was escorted from the property but immediately returned by "scaling a fence and got into another tussle with the man, both falling to the ground during the struggle, police prosecutor Sergeant Garry Wilson said.
He kicked the man in the knee with a martial arts round house type kick, he said.
"He demanded a cellphone he had misplaced."
Smith then grabbed a 63-year-old man by the neck, head butting him in the forehead then threatened to kill the residents as he was again ejected from the property, Mr Wilson told the court.
When arrested, police found a small roll of cannabis in tinfoil on him and when confronted with it, Smith delivered a head butt strike to the constable's face, the court heard.
He was drunk, belligerent and aggressive to staff dealing with him, Mr Wilson said.
Defence lawyer Jock Blathwayt told the court Smith needed specialist treatment and was out of control the time of the incident.
"He behaved badly ... he was beyond control. He has now settled after six weeks in prison ... Nothing will change unless he gets specialist treatment."
Mr Blathwayt requested the judge consider time served as a sufficient sentence.
Judge Walsh said he wasn't unsympathetic to Smith's plight but he needed to ensure the safety of the public, indicating he couldn't release him until he was confident of this.
He also noted Smith hadn't co-operated with Community Corrections when previously sentenced to supervision and intensive supervision.
"He blames everybody for his problems. He has got all sorts of issues troubling him. I'm sympathetic but it comes to a point the public has to be safe. When he gets on the booze he gets out of control. These are risk factors I have to weigh up," the judge said.
At this stage of the appearance, Smith became agitated and started swearing before punching the wall.
"If I had a gun I'd shoot myself."
Judge Walsh heard the rest of the case in chambers before remanding Smith in custody for a specialist report and sentencing on October 24.