I'm a member of staff on the Minecraft server VillageCraft, and back in the day we had a side server that ran a Feed The Beast modpack for players who wanted to play a modded version of the game. We weren't too happy with it though. We didn't have much control, people were annoyed at the mods being out of date, and we were unable to add our own mods to the pack easily. Eventually, it died off. But after about a year, people asked about it again. This is where I came in.
I remember reading somewhere that it would be almost impossible to keep a modpack updated via the vanilla launcher. So I decided to try get that little bit that made it "almost", and make it work. I did this by using LaunchWrappers, which run before the main game. I made a LaunchWrapper, and had it read a JSON file I host here. This detects if there is a new version of the modpack avaliable. If there is, it will downlaod it from my site, extract it, copy all the relevant files over, then start the game as normal. This worked beautifully, as I could combine it with Forge and launch any mods easily. It was exactly what I wanted.
I then had the issue of distributing it. I decided the best way would be to create an installer, similar to Forge's, which creates a new profile in the launcher, sets all the required java arguments and game directories, and provides the links to my LaunchWrapper. The vanilla launcher has a feature where it downloads any required libraries automatically, so I decided to use this to download both my LaunchWrapper and Forge. I ended up having to rehost Forge on my own server, due to some naming issues with their system. This keeps the LaunchWrapper updated, which means if I ever need to change something the launcher can do it without much intervention.
At the end of the weekend, I realised what I had created. I told some of the other server admins what I'd done, and they realised how powerful it really is. I had created something that, with a double click, players could play the most up-to-date version a modpack we had full control over. That person who said it was "almost impossible" didn't consider this approach. Yeah, it may not be the best method, and yeah it might not be the most efficient thing ever, but it works. That's the main thing. It works.
As I created this for VC, I'm hesitant to provide code explaining how I did this without first consulting the other admins. If you want to try and recreate this yourself, contact me and I'll be happy to provide any information you need. That said, everything you'd need is avaliable at luisc99.tk/assets/vcmodded if you wish to decompile it yourself and figure out what I've done. If you do this, I ask that you don't copy it and claim it as your own. That would be dishonest, and I'm not afraid to name and shame you. This is my code, that took me hours to figure out what to do. It's likely the only worthwhile thing I'll really produce for the modded Minecraft community. Don't be a jerk and steal this from me. Thanks :)