So I'm a returning player to minecraft, the last version I played was 1.8. Upon downloading minecraft and booting it up, I noticed an "installations" tab in the new launcher. This got me wondering if it is possible to mod just one of these installations, and how you would go about it if it was possible. This would be great because I would like to play modded minecraft, but none of my friends do. If I could easily switch back and forth between installations, one modded and one vanilla, I could get the best of both worlds.
If you have multiple modded version profiles that are 1.12.2 and below you can use say a '1.12.2' folder in the mods folder .Minecraft/mods/1.12.2 for example and it will play the mods, if you have Forge, Rift or Fabric (new modloaders that exist now) that feature to read mods in deeper folders doesn't work anymore for 1.13+ modloaders.
But yeah if you want to play modded 1.7.10, 1.10.2, 1.8, 1.8.9, 1.12.2 or 1.13+ versions, even snapshots you can just create a new profile, set up a modloader you want (most likely Forge or Liteloader for versions between 1.7.10 and 1.12.2) and your good to go.
There is also datapacks that are like early Official Modding API Vanilla mods of sorts too that you can put in your saves/datapacks folder or if using Fabric can use a mod that loads the datapacks in a global folder. They aren't the same as mods where it adds new items, biomes and so on as 100% brand new content but rather a half step of modding where developers re-using Vanilla ones with different functions or textures or particles or locations in the nether to achieve a mod-like experience (that and mods do use datapacks to achieve things due to 1.13+ changes that datapacks were added.
Put folder similar to what I have in the image (just ignore the 1.13+ release and 1.14 snapshots, I have them for separating, remember 1.12.2 loads mods 1.13+ doesn't). If you want things to be easier just go with Twitch or MultiMC instead so you don't have to worry about doing this.
So I'm a little confused about where to make these different folder versions. I have forge for 1.12.1 and have been playing it, but I would also like to play 1.7. At the moment all of my mods are just in the default mods folder and I'm kind of lost on the formatting here.
You can create a new game directory by simply adding a name to the end of the default directory; for example, I have several directories:
.minecraft - the default game directory, used by my first world (modded 1.6.4)
.minecraft\TMCW - used for my current world and mod of the same name (another modded 1.6.4 installation)
.miencraft\TMCWv4 - used by another modded 1.6.4 installation
.minecraft\Testing - used for testing things
To make the latter three all I did was edit the default path to add in "TMCW", "TMCWv4", or "Testing" (all without quotes, just normal file names) to the end and it automatically created new directories there when I launched the game for the first time (you can also create a folder like you normally would anywhere else and paste the path into the game directory box; this can even be on a different drive in case you e.g. have limited space on your main drive. In any case, you do not need to create any sub-folders inside it; just launch the game once and it will create the saves, mods, resourcepacks, etc folders).
Also, while it is true that you can make sub-folders under "mods" for various Forge versions I absolutely do NOT advise this since it won't completely separate everything - try loading a 1.13 world in 1.12 or older and it will be totally ruined with no hope of recovery other than a backup. Similar damage occurs if going from 1.14 or the 1.15 snapshots to an older version, while e.g. 1.12 to 1.11 will still cause significant corruption and loss of blocks/items/entities, more so for opening modded worlds in vanilla (note that since 1.9 the game does warn you when you try to open a world last loaded in a newer version but older versions give no such warning, same for using vanilla to open a modded world of the same version).
The game can even crash on launch as it attempts to load invalid settings from the game's "options.txt" file (and/or other configuration files used by mods), a leading cause of crashes when trying to play older versions, which many people "fix" by reinstalling the game when all they had to do was make a custom directory, or delete the file, but that isn't advised due to the aforementioned risk of opening a world in the wrong version. At the least, settings may be reset or changed when upgrading/downgrading.
Also, as I understand it you can't make separate Forge instances of the same version with their own sets of mods unless you use separate game directories (as shown above I currently have 3 separate modded 1.6.4 instances, non-Forge so the version jar itself is the entire modded instance, but for Forge you'd need 3 separate mod folders unless you had separate game versions, e.g. "mods\1.6.4", "mods\1.7.10", "mods\1.12.2". This will obviously not work if you want more than one modpack for the same version).