question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

launcher cant download .JAR for custom version

See original GitHub issue

it happens because custom versions use inheritsFrom, so need to read original version and merge with custom.

My solution that works: change handler.js, line 106, getVersion:

return new Promise(resolve => {
  const versionJsonPath = this.options.overrides.versionJson ||
      path.join(this.options.directory, `${this.options.version.number}.json`)
  if (fs.existsSync(versionJsonPath)) {
      let version = JSON.parse(fs.readFileSync(versionJsonPath))

      if (version.inheritsFrom != null) {//my solution

          this.options.overrides.versionJson = undefined;
          this.getVersion(version.inheritsFrom).then((parentt) => {
              this.version = {...version, ...parentt };
              return resolve(this.version);
          });

      } else {
              this.version = version;
              return resolve(version);
      }
  }

also need to set this.options.overrides.versionJson to custom version instead original version number, tho it is possible to do in configs.

that will make library launch forge and fabric without any problems!

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Pierce01commented, Jun 12, 2022

I apologize for the late response, I was dealing with finals. For now, use the technic version json (which is right under where you got this one) since that one is properly formatted. I’ll go ahead and add this to my todo list on version json formats to support

0reactions
arduinka55055commented, May 11, 2022

as you may see it has only libs required by fabric, no downloads. inheritsFrom probably says to use 1.18.2 as some kind of dependency. merging fabric-loader and vanilla jsons solve that problem

{
    "id": "fabric-loader-0.13.3-1.18.2",
    "inheritsFrom": "1.18.2",
    "releaseTime": "2022-04-18T08:29:14+0000",
    "time": "2022-04-18T08:29:14+0000",
    "type": "release",
    "mainClass": "net.fabricmc.loader.impl.launch.knot.KnotClient",
    "arguments": {
        "game": [],
        "jvm": [
            "-DFabricMcEmu= net.minecraft.client.main.Main "
        ]
    },
    "libraries": [
        {
            "name": "net.fabricmc:tiny-mappings-parser:0.3.0+build.17",
            "url": "https://maven.fabricmc.net/"
        },
        {
            "name": "net.fabricmc:sponge-mixin:0.11.2+mixin.0.8.5",
            "url": "https://maven.fabricmc.net/"
        },
        {
            "name": "net.fabricmc:tiny-remapper:0.8.1",
            "url": "https://maven.fabricmc.net/"
        },
        {
            "name": "net.fabricmc:access-widener:2.1.0",
            "url": "https://maven.fabricmc.net/"
        },
        {
            "name": "org.ow2.asm:asm:9.2",
            "url": "https://maven.fabricmc.net/"
        },
        {
            "name": "org.ow2.asm:asm-analysis:9.2",
            "url": "https://maven.fabricmc.net/"
        },
        {
            "name": "org.ow2.asm:asm-commons:9.2",
            "url": "https://maven.fabricmc.net/"
        },
        {
            "name": "org.ow2.asm:asm-tree:9.2",
            "url": "https://maven.fabricmc.net/"
        },
        {
            "name": "org.ow2.asm:asm-util:9.2",
            "url": "https://maven.fabricmc.net/"
        },
        {
            "name": "net.fabricmc:intermediary:1.18.2",
            "url": "https://maven.fabricmc.net/"
        },
        {
            "name": "net.fabricmc:fabric-loader:0.13.3",
            "url": "https://maven.fabricmc.net/"
        }
    ]
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

[MCL-20504] Launcher fails to download jar for json version ...
The launcher is trying to download the 1.17. 1 jar from https://s3.amazonaws.com/Minecraft.Download/versions/1.17.1/1.17.1.jar, that seems to ...
Read more >
How To Use Custom Jars In The New Launcher - Java Edition ...
1. Create a new profile · 2. Download/Start Minecraft · 3. Go to the Local Version Editor · 4. Right click anywhere, ·...
Read more >
[HELP REQUEST] Can't create custom versions to use in the ...
Download the Forge Installer for the version you want. 2. Run the jar and select the "Client" option. It should create a new...
Read more >
minecraft cannot download versions and libraries - Arqade
This is likely your launcher is out of date and is trying to get files from locations they are no longer at or...
Read more >
How to Install a Custom JAR (Custom Server Type) - Shockbyte
jar , X being the required Java version). Make sure that it is in lowercase, otherwise, it will not load properly. Custom JAR;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found