I was using xray (i know, how cheaty of me) and i was getting sick of having to go into my resource pack folder and diable it anytime i wanted to stop mining or go back to mining again. Because of this, i tried another mod that does this, but it was making me put it into the .minecraft resourcepack folder instead of just using my instance folder. I didnt want to do that, so i instead decided to make this.
NJow if by me using xray you didnt get the idea i can be lazy, that is the main reason for all of this, so i was not interested in trying to write any code to make this mod toggle resource packs alone, so of course i used a mod called ResourceControl to do the hard part for me, so that mod is necisarry for this project to do what it needs to do.
How To Use P2G:
Before anything else, go to your keybind settings and scroll untill you find the P2G section, and then select the keybinds you want to use. Both are set to f6 by default, so you will need to change atleast one of them. After you do that, you need to go back to game and press the Setup keybind. From there, type in the exact filename of the resourcepack and then press finish.
You can now press the other keybind and it will turn the resourcepack on and off!