A masked thug who fired fireworks at cops during the Bonfire Night of "mass disorder" has been told he is facing a jail sentence.