A man thought that he was going to die as he was lying prone in his own home being punched and kicked by two men who were not invited to be there.
The violence was instigated by Kodye Bickley, who along with a co-offender raided the victim's pockets and robbed him of his belongings before they left.
Bickley pleaded guilty to aggravated robbery in Whanganui District Court where he was sentenced by Judge Philip Crayton on Monday.
Judge Crayton said Bickley punched the victim in the head on November 9, 2017, forcing his glasses to fall off.
"There was repeated punching and kicking to the head, face and body of the complainant as he laid on the ground, prone," the judge said.
"The complainant was left with a laceration above his right eye, severe bruising to his right eye and a dislocated left shoulder."
Following the assault, the assailants stole a black bag, a cellphone and a computer from the victim worth $250.
Earlier that night, the victim had been painting a car while his wife slept inside and they invited some guests over later on.
Bickley and the co-offender arrived uninvited at 2.37am, waiting under a car port for an undisclosed amount of time before entering and attacking the victim.
Judge Crayton said that a victim impact statement identified that the victim feared he would lose sight in his eye and his vision was still blurry when tested in October 2018.
"He fears rightly, that he may be affected permanently by the physical harm caused," Judge Crayton said.
"He expressed shock at the level of violence even though it was unprovoked. As he put it, he thought he was going to die."
The victim also continues to suffer from migraines, memory loss and he has difficulty concentrating.
The assault also impacted him financially as he was unable to work and he is currently seeing a psychologist.
Bickley also pleaded guilty to charges of possessing instruments for burglary, driving while disqualified, unlawfully taking motor vehicles, burglary, breaching court release conditions and two charges of unlawfully getting into or upon motor vehicles.
Bickley had a long history of dishonesty and burglary offences before the court, as well as appearing 11 times for driving while disqualified.
The judge said a cultural report about Bickley was very helpful before sentencing, noting that the defendant had a strong willingness to engage in rehabilitation.
Judge Crayton sentenced Bickley to five years, one-and-a-half months' imprisonment. He is also disqualified from driving for one year and one day.