Worried about his vehicles after seeing a man with a hammer, he picked up a crowbar and went outside.
He was hit with a hammer between 10 and 20 times on the top of his head, neck, shoulder and arms.
The blow to his head left a large wound which started to bleed heavily but he managed to move back inside his house and shut the door.
His wife was woken up and called 111.
While she was on the phone, Mokaraka and his associates started smashing the windows of the house.
Mokaraka kicked two glass ranchslider doors and cut his leg.
Others stole a laptop and a cellphone before all ran away.
Several police officers in the area for an unrelated matter saw Mokaraka hide behind a house about 200m away and arrested him.
The stolen laptop and cellphone case were recovered.
The victim's injuries caused significant bleeding which resulted in a brief seizure.
He was given a blood transfusion.
Mokaraka denied hitting the victim with a hammer but Crown prosecutor Jarred Scott said it did not matter who had the weapon because those involved were equally responsible for the crime.
Judge Harvey noted Mokaraka's close family members were present in court during his sentencing and said he had hurt his whanau badly.
"Sadly this type of offending happens quite frequently in Whangarei. I need to send a message to people who behave in this way that they can expect no mercy from court."
He accepted a letter of remorse that Mokaraka wrote to court before sentencing him to two years and 11 months in jail.