Williams is charged over the death of his friend Shaun Townsley, who was shot dead on January 12 while he and friends were drinking in the backyard of a Manurewa home and shooting targets off a fence.
He was rushed to Middlemore Hospital after the incident but he died soon after arrival.
Outside court today, Detective Inspector Dave Lynch said the airgun allegedly used by Williams was bought legally and was not covered by laws surrounding high-powered air rifles.
"In general terms it would appear that some people still have the perception that airguns are toys."
He said he was aware of three recent cases in which people had been shot by airguns.