Gosling also supplied a small amount of cannabis to a 13-year-old at his house.
About 3pm, Gosling was sitting in the lounge with a 13-year-old boy, when Gosling deliberately shot him in the head.
The pellet lodged in the victim's scalp, but the injury was minor in nature and did not require stitching.
In an explanation to police, Gosling said the victim told him to shoot at his head, knowing the air rifle was loaded. Gosling did not think the pellet would penetrate the victim's cap.
Asked about possessing the rifle without a firearms licence, Gosling said he was not aware it was required for an air rifle.
He admitted supplying alcohol to the minors and supplying cannabis to a 13-year-old boy.
Judge Maze convicted him on all charges, and remanded him on bail to reappear in the Oamaru District Court for sentencing on October 22. He was referred for restorative justice.
Judge Maze said the permanent damage to adolescent brains from alcohol and cannabis Gosling's responsibilities were topics needing to be addressed.