When running the game with the options.version.custom option set to fabric, the module downloads the correct version of the loader json file, under the name :
${minecraft_version}.json.
However, when loading the file, it tried to load the ${options.version.custom}.json file, which caused an error and prevented the game from launching.
How to reproduce the bug
Just set the value of the version.custom option to fabric.
For example:
const { Client, Authenticator } = require('minecraft-launcher-core');
const launcher = new Client();
let opts = {
// For production launchers, I recommend not passing
// the getAuth function through the authorization field and instead
// handling authentication outside before you initialize
// MCLC so you can handle auth based errors and validation!
authorization: Authenticator.getAuth("username", "password"),
root: "./minecraft",
version: {
number: "1.18.2",
type: "release",
custom: "fabric"
},
memory: {
max: "6G",
min: "4G"
}
}
launcher.launch(opts);
launcher.on('debug', (e) => console.log(e));
launcher.on('data', (e) => console.log(e));
The error
debug : [MCLC]: Failed to start due to Error: ENOENT: no such file or directory, open '/home/pioupia/.config/launcher/.minecraft/versions/fabric/fabric.json', closing...
Then the game does not start.
Additional information:
I made a pull request that solves the problem, if you want to see : #106
Describe
When running the game with the
options.version.custom
option set tofabric
, the module downloads the correct version of theloader
json file, under the name :${minecraft_version}.json
.However, when loading the file, it tried to load the
${options.version.custom}.json
file, which caused an error and prevented the game from launching.How to reproduce the bug
Just set the value of the
version.custom
option tofabric
.For example:
The error
Then the game does not start.
Additional information:
I made a pull request that solves the problem, if you want to see : #106