He is probably beginning to feel his hormones and his oats...ie becoming dominant over his flock, and you are seen as an intruder.
Roosters are notorious for being snippy and some will attack you. It is part of the protector of the flock role they play.
You can try to discourage him and/or put him down and not pet him as he is not seeing himself as a pet.
If he becomes too aggressive, you will have to re-home him. If he attacks everything in sight, he might be hard to place. However, if he simply protects his flock and just doesn't want to be messed with, but not the pet you want, he will make a fine addition to someone in more of a farm-like setting that would like a rooster to protect their flock.
Lady of McCamley