Jason Jeremiah Kaimoana, 34, Quentin Kane Kaimoana, 24, Joshua Jermaine Robin, 19, and Dion Marley Campbell, 33 are charged with being part of an organised criminal group.
Crown prosecutor Clayton Walker said it was not known who fired the shotgun in Wairoa on October 26, 2010, but that did not matter.
The Crown case was that Riki and Cleveland Raroa encouraged or assisted Mongrel Mob members to be present at the gang pad that night.
There were weapons there and they intended to cause grievous bodily harm to any Black Power members if such a situation arose.
Mr Walker said all six men were charged with being part of an organised criminal group because they were involved in the manning of the pad where firearm(s) were present, or supplied firearms or, in the case of Riki Raroa, "organised everything from afar" by sending text messages.
The stealing of a Black Power car on October 23, 2010 appeared to be the trigger for the shooting incident, said Mr Walker.
The thief drove to the gang pad, pursued by police.
His actions were "a provocative act" not appreciated by the Mongrel Mob, who believed the incident could lead to Black Power retaliation.
Police later recovered test messages that indicated the Mongrel Mob went on to red alert after the theft.
Ricky Raroa, in the absence of any mob president after an earlier intra-gang clash and many arrests, was the principal organiser.
"He was organising the troops."
Numerous texts showed the pad was to be manned, with firearms on the premises at night.
The firearms, described in code as "mutton, pieces, things or rakau (Maori for stick or weapon)", were to be taken away each morning.
In the early hours of October 26, four Black Power men drove to the Mongrel Mob pad in the vehicle that had earlier been stolen.
Two men got out of the vehicle and the second one was shot.
The Black Power members drove away leaving one man behind.
The injured man arrived at Wairoa Hospital at 3am.
He had 40 shotgun pellet wounds and had been struck in the small bowel, hip and kidney.
The kidney was later removed, said Mr Walker.
When police went to the pad, they found Cleveland Raroa, Joshua Robin and another man who has not been charged because no text messages involved him.
No weapons were present.
The two accused told police they had been wakened by a commotion.
"The text messages tell a different story," said Mr Walker.
Robin was the only one of the six accused not involved in any pre-shooting texting.
He went to the gang pad after the shooting.
Police also recovered congratulatory text messages sent after the shooting.
In December, Robin texted his girlfriend saying he had seen one Black Power member running for his life.
He also described what happened on the night of the shooting and later sent other texts expressing concerns about "narks", said Mr Walker.
The trial continues