I made this about 3 months before you :/
Also, your code breaks crouching
(It stops me from crouching when I want to)
I hate to break it to you, but some mods require Right clicking to use iron sights, or other mods, so you might interfere with that as well