0.0.2 • Published 4 years ago
ashink v0.0.2
Ashink (Launcher - Node)
Really simple auto updater for MCLC launchers. Consider use AShink server before.
How to use ?
// Import modules
const { Client, Authenticator } = require('minecraft-launcher-core');
const AShink = require("ashink");
const launcher = Client();
let opts = {
clientPackage:null,
// We recommend for production launchers to don't use
// Authenticator.getAuth() in this field directly,
// so MCLC can handle errors.
authorization: Authenticator.getAuth("username", "password"),
root:"./minecraft",
version: {
number:"1.12.2",
type:"release"
},
// More info at MCLC npm page
forge:"./forge.jar",
memory: {
min:"2048",
max:"4096"
}
}
// TODO : Replace the url with your own url
let modpackUpdater = new AShink("https://example.com/ashink");
if(!modpackUpdater.isUpdated()){
opts = modpackUpdater.prepareUpdate(opts);
}
launcher.launch(opts);
launcher.on('debug', (e) => console.log(e));
launcher.on('data', (e) => console.log(e));