A young man punched another man in the face in a "random act of mindless violence" that left the victim with two missing front teeth.
Raymond Dunne (21) attacked the man for no reason as they passed in the street, then kept walking.
Judge John Cheatle said he can avoid a three-month jail sentence if he is found suitable to carry out 140 hours of community service.
Mr Dunne, of Killinarden Estate, Tallaght, admitted assault causing harm to the man (38) at the Hole In The Wall Road, Donaghmede, on August 21, 2013.
Dublin District Court heard the attack happened at 11.30pm when Dunne was drunkenly staggering and "for no obvious reason" struck the victim with a single, unprovoked punch to the mouth.
There had been no verbal exchange or confrontation and Dunne continued walking.
"It was a random act," the prosecuting garda said.
Dunne later told gardai he was not "in the right frame of mind," at the time, and apologised.
The victim had two teeth removed afterwards, the court was told. Four lower teeth remained loose. The man was already missing two front teeth and had grave pre-existing gum disease, defence barrister Karl Monahan pointed out. However, the assault exacerbated his dental problems.
Dunne had himself been the victim of assaults and this had led him into a cycle of drinking, Mr Monahan said. He was taking an addiction studies course and was now alcohol-free.
There had been "no animus" against the victim and it had been a "senseless act," Mr Monahan said.
Judge Cheatle adjourned the case.