How to install mods for the new Minecraft launcher
I've recently changed to the new Minecraft launcher, and I have noticed a change in the .minecraft folder layout. I can no longer install mods just by copying it over into the versions/1.6.1 jar file, as this file refreshes every time it is launched.
For those who don't know what I am talking about, here is the new layout:

I am specifically trying to install Optifine, which does work with 1.6.1. Where do I drag in the mod files now? I can't seem to find a jar file that is suited to it, except in the version folder, but as I stated above, this refreshes every time.
After copying a recent version and renaming it in the version folder, I get this error in the development console:
Unexpected exception refreshing version list
java.lang.IllegalArgumentException: Version '1.6.1' is already tracked
at net.minecraft.launcher.updater.VersionList.addVersion(VersionList.java:91)
at net.minecraft.launcher.updater.LocalVersionList.refreshVersions(LocalVersionList.java:44)
at net.minecraft.launcher.updater.VersionManager.refreshVersions(VersionManager.java:47)
at net.minecraft.launcher.Launcher$2.run(Launcher.java:164)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Best Answer
Seeing as none of the answers so far have covered this, it is now possible to do it. For a long while now, APIs such as Forge have transitioned to the new layout for quite some time now, and Forge especially has its own installer that you can use to automatically drop a modified .jar archive already prepared to be used.
The universal-OS installer (used since 1.6 Forge) looks something like this.
Pictures about "How to install mods for the new Minecraft launcher"



Can you use mods on the new Minecraft launcher?
The new launcher is, ultimately, part of a rather large series of changes to Minecraft, including making mods actually something the game supports via the new Resource Pack stuff, but until that time, modding is a bit more awkward. However, there's still a way to do it. Go into the versions folder inside .How do you install mods on Minecraft launcher 2021?
How to Add Mods to Minecraft ForgeHow do you install mods for Minecraft 2020?
How to Download Mods for Minecraft \u2013 2022 TipsHow To Download \u0026 Install Minecraft Mods in 2022
More answers regarding how to install mods for the new Minecraft launcher
Answer 2
If you're willing to download MagicLauncher in addition to your regular launcher, it supports the original <1.6 way of installing mods. Just copy the mod files into the .jar, and MagicLauncher won't overwrite it. You now only need the official launcher to get new releases.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Ksenia Chernaya, Ksenia Chernaya, Ksenia Chernaya, Ksenia Chernaya

