Skip to content

Instantly share code, notes, and snippets.

@phit
Last active June 5, 2017 10:16
Show Gist options
  • Save phit/1939626a84bf8f018e16a385817a48ba to your computer and use it in GitHub Desktop.
Save phit/1939626a84bf8f018e16a385817a48ba to your computer and use it in GitHub Desktop.
Twitch/Curse & Vanilla Minecraft Launcher Linking

First we will setup the assets, forge & libs to be called from the curse installation, to avoid duplication and to make Forge installed by Curse available in the Vanilla launcher. You might have to the delete the original folders from the the .minecraft directory, then run this in an elevated command prompt.

SET CURSEDIR=yourcursepathhere
mklink /D %CURSEDIR%\Minecraft\Install\assets %appdata%\.minecraft\assets
mklink /D %CURSEDIR%\Minecraft\Install\versions %appdata%\.minecraft\versions
mklink /D %CURSEDIR%\Minecraft\Install\libraries %appdata%\.minecraft\libraries

This requires some kind of Bash for Windows, I'm personally using Mingw64 since it's included with git for Windows. The only difference should be paths. You also need to install jq.

Locate MinecraftGameInstance.json in %appdata/Curse Client/GameInstances and make sure it's there. Then all you have to do is run this script and it will get all your installed modpacks and create a launcher_profile.json with them for you. Remove the newlines & change the paths depending on your personal setup!

cat /c/Users/phit/AppData/Roaming/Curse\ Client/GameInstances/MinecraftGameInstance.json | 
jq '.[] | {name: .name, lastVersionId: .baseModLoader.Name, gameDir: .installPath, 
javaArgs: ("-Xmx5G -Xms5G -Dfml.ignorePatchDiscrepancies\u003dtrue -Dfml.ignoreInvalidMinecraftCertificates\u003dtrue -Dfactorization.ignoreForgeVersion\u003dtrue -Dminecraft.applet.TargetDirectory\u003d\"" + .installPath), 
useHopperCrashService: "false", launcherVisibilityOnGameClose: "keep the launcher open"} | {profiles: {(.name): .}} | add' | 
sed ':a;N;$!ba;s/}\n}\n{/},/g' | jq '. | {"profiles": .}' 
> /c/Users/phit/AppData/Roaming/.minecraft/launcher_profiles.json

In the .minecraft folder edit the launcher_profiles.json and add something like this depending on what pack you want. Most of the info should be self explaining. You have to replace CURSEINSTANCESFOLDER with the of your folder in my case it would be D:\\Games\\Curse\\Minecraft\\Instances note the double \\ thats important

{
  "profiles": {
    "FTB Infinity Evolved": {
      "name": "FTB Infinity Evolved",
      "gameDir": "CURSEINSTANCESFOLDER\\FTB Infinity Evolved",
      "lastVersionId": "forge-10.13.4.1614",
      "javaArgs": "-Xmx4096m -Xms4096m -Dminecraft.applet.TargetDirectory\u003d\"CURSEINSTANCESFOLDER\\Instances\\FTB Infinity Evolved\" -Dfml.ignorePatchDiscrepancies\u003dtrue -Dfml.ignoreInvalidMinecraftCertificates\u003dtrue",
      "launcherVisibilityOnGameClose": "keep the launcher open"
    },
    "The Pioneers": {
      "name": "The Pioneers",
      "gameDir": "CURSEINSTANCESFOLDER\\The Pioneers",
      "lastVersionId": "forge-11.15.1.1764",
      "javaArgs": "-Xmx4096m -Xms4096m -Dminecraft.applet.TargetDirectory\u003d\"CURSEINSTANCESFOLDER\\The Pioneers\" -Dfml.ignorePatchDiscrepancies\u003dtrue -Dfml.ignoreInvalidMinecraftCertificates\u003dtrue",
      "launcherVisibilityOnGameClose": "keep the launcher open"
    },
    "FTB Infinity Evolved Skyblock": {
      "name": "FTB Infinity Evolved Skyblock",
      "gameDir": "CURSEINSTANCESFOLDER\\FTB Infinity Evolved Skyblock",
      "lastVersionId": "forge-10.13.4.1614",
      "javaArgs": "-Xmx4096m -Xms4096m -Dminecraft.applet.TargetDirectory\u003d\"CURSEINSTANCESFOLDER\\FTB Infinity Evolved Skyblock\" -Dfml.ignorePatchDiscrepancies\u003dtrue -Dfml.ignoreInvalidMinecraftCertificates\u003dtrue",
      "launcherVisibilityOnGameClose": "keep the launcher open"
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment