MinecraftLauncher-core icon indicating copy to clipboard operation
MinecraftLauncher-core copied to clipboard

[Feature request] Library overrides

Open H4kt opened this issue 2 years ago • 2 comments

I would like to be able to dynamically override a library.

Example use case: Our launcher has custom auth service and thus requires us to provide our custom AuthLib instead of the vanilla one.

Example configuration syntax:

const opts = {
  ...
  overrides: {
    libraries: {
      "com.mojang:authlib:<=3.2.38": {
        url: "https://custom.io/",
        name: "io.custom:authlib:3.2.38",
        sha1: "<sha1 here>"
      }
    }
  }
}

Result: MCLC will not download mojang's AuthLib but will download a custom one instead and launch game using it.

H4kt avatar Jul 21 '22 23:07 H4kt

I don't know too much about this specifically but there are a few ways you may be able to achieve this:

  1. Change the version.json file to use your custom libraries
  2. Allow downloading of the other libraries by MCLC then overriding then with your libraries, then allowing a launch (patching)
  3. Combination of 1 and 2 with the custom library folder

Apologies if I didn't respond to your issue with exactly what you're looking for, but in the meantime these may work!

AarushX avatar Jul 22 '22 12:07 AarushX

This is a great idea! This would enable quick library overrides which would streamline a lot of things for quick modifications.

I'll add this in when making the next patch/update. I'll close the issue when it gets added.

Pierce01 avatar Jul 25 '22 21:07 Pierce01