A man who threw a bottle at police during rioting outside a Rotherham hotel last summer has been given a "substantially reduced" prison sentence by a judge who heard he has the mental age of a 10-year-old.