Scott Wilcox was refused a lift home from the taxi driver on Clumber Street, at 3.30am, on May 14, and he called the driver a racist name.
Prosecutor Kate Hartley said an eye witness reported Wilcox to police for shouting homophobic and misogynistic abuse in the street, but when officers tried to intervene, he ran off.
A police constable gave chase and Wilcox lashed out and hit him on the arm in order to get away, but he was arrested shortly afterwards.
Wilcox, 27, of Huthwaite Road, admitted racially aggravated harassment, possession of cannabis, resisting a constable in the execution of his duty, and using threatening words and behaviour, when he appeared before magistrates in Mansfield, on Monday.
The court heard he has 11 convictions for 30 offences, including another public order offence, in February 2017, for which he was given a 12 month community order for shouting abuse at people in the street.
Emma Cornell, mitigating, said Wilcox denied the matters in interview but admitted them in court.
“He has a very short temper and a very short fuse,” she said. “Whilst in drink he made these comments. He denies holding racist views.
“He was running around cars to avoid the officers. It was a very short incident. He is currently on medication and attends Millbrook mental health hospital.”
The previous order was revoked and a new 12 month community order was imposed with 20 days of a rehabilitation activity.
He will pay £100 compensation to the taxi driver and £50 to the police officers, as well as costs of £85.
He must also abide by the terms of a four month curfew, from Friday to Sunday, from 7pm to 7am.