Two cannabis plants were also found in a wardrobe at the home in which Johnson lived in 2011, while he took petrol worth more than $361 in five petrol drive-offs in Whangarei.
Judge Harvey said initially he intended to jail Johnson because of his attitude towards the law and because he had refused to sign up for home detention as a possible sentence.
The judge said the probation report showed a man with a bad attitude.
"I took the fact that you were refusing to sign the home detention consent as a further indication of your anti-social attitude," he said.
"If it hadn't been for Mr Day you would be going to prison. Mr Day said you have changed your approach since talking to the probation officer, and I wonder how much your family has had to do with that. Fortunately, you have come to your senses."
Judge Harvey said the attack was random street thuggery and while the victim might have taunted Johnson, it did not justify his reaction.
"The community has had enough of violence on the streets and the courts are being asked to take a hard line. Had the summary of facts told me that you had kicked him in the head, you would have gone to prison."
The judge said home detention was not an easy sentence but would be easy to breach.
"If you breach home detention, you leave the court with no other choices. Please get this sentence completed over the next year. We don't want to see you again."
He also ordered Johnson to pay full reparation for the stolen petrol.