1.1.0 • Published 4 years ago
mclc-plugin-modpack-manager v1.1.0
mclc-plugin-modpack-manager
This package is an extension of the package MCLC.
Installing
For now, just add this in your package.json
:
{
"dependencies": {
"minecraft-launcher-core": "git+https://github.com/Bricklou/MinecraftLauncher-core#plugin-manager",
"mclc-plugin-modpack-manager": "latest"
}
}
Standard Example with MCLC
const { Client, Authenticator } = require('minecraft-launcher-core');
const ModpackManager = require('mclc-plugin-modpack-manager');
const launcher = Client();
// Ask to MCLC to use the plugin
launcher.use(ModpackManager);
let opts = {
clientPackage: null,
// 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",
os: "windows",
version: {
number: "1.12.2",
type: "release"
},
// Read the docs about MCLC for more information about how manage forge
forge: './forge.jar',
memory: {
max: "6000",
min: "4000"
},
// New option added by the plugin
modpackManager: {
modsList: modsList
}
}
The mods list argument need to be formatted like this:
const modsList = {
64578: { // The mod ID available on the curseforge mod's page
fileId: 2858816, // The id of the file you want to download
hash: "8495577037840e0cacbc1c0c5914d459" // The hash of the file (which is available on the file page on curseforge)
},
238222: {
fileId: 2803400,
hash: "cfdbfecefb1bdc5a3fbbcecbfecb0545"
},
...
};
Note: You also need to add manually the mods dependencies, otherwise your game will not be able to run because they won't have been installed.