mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2025-02-23 20:51:30 +03:00
moved error to data. Read DESC
before you go "wait what the f*ck", in older versions, the minecraft process emits data to `error` instead of normal `data`. In newer versions, errors and data are all processed through `data`, making `error` pointless.
This commit is contained in:
parent
001f52e150
commit
22baef8735
4 changed files with 11 additions and 7 deletions
|
@ -323,7 +323,8 @@ class Handler {
|
|||
const assetRoot = this.options.overrides.assetRoot || path.join(this.options.root, 'assets');
|
||||
const assetPath = this.version.assets === "legacy" || this.version.assets === "pre-1.6" ? path.join(assetRoot, 'legacy') : path.join(assetRoot);
|
||||
|
||||
if(args.length < 11) args = args.concat(this.version.minecraftArguments ? this.version.minecraftArguments.split(' ') : this.version.arguments.game);
|
||||
const minArgs = this.options.overrides.minArgs || 5;
|
||||
if(args.length < minArgs) args = args.concat(this.version.minecraftArguments ? this.version.minecraftArguments.split(' ') : this.version.arguments.game);
|
||||
|
||||
if({}.toString.call(this.options.authorization) === "[object Promise]") {
|
||||
this.options.authorization = await this.options.authorization;
|
||||
|
|
|
@ -86,7 +86,7 @@ class MCLCore extends EventEmitter {
|
|||
|
||||
if(this.options.customArgs) jvm = jvm.concat(this.options.customArgs);
|
||||
|
||||
const classes = await handler.cleanUp(await this.handler.getClasses());
|
||||
const classes = this.options.overrides.classes || await handler.cleanUp(await this.handler.getClasses());
|
||||
let classPaths = ['-cp'];
|
||||
const separator = this.handler.getOS() === "windows" ? ";" : ":";
|
||||
this.emit('debug', `[MCLC]: Using ${separator} to separate class paths`);
|
||||
|
@ -115,7 +115,7 @@ class MCLCore extends EventEmitter {
|
|||
|
||||
const minecraft = child.spawn(this.options.javaPath ? this.options.javaPath : 'java', launchArguments);
|
||||
minecraft.stdout.on('data', (data) => this.emit('data', data));
|
||||
minecraft.stderr.on('data', (data) => this.emit('error', data));
|
||||
minecraft.stderr.on('data', (data) => this.emit('data', data));
|
||||
minecraft.on('close', (code) => this.emit('close', code));
|
||||
|
||||
return minecraft;
|
||||
|
|
Loading…
Add table
Reference in a new issue