mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2024-11-25 13:36:21 +03:00
added cwd
This commit is contained in:
parent
22baef8735
commit
779f828cde
3 changed files with 5 additions and 3 deletions
|
@ -81,10 +81,11 @@ let opts = {
|
|||
overrides: {
|
||||
minecraftJar: "",
|
||||
versionJson: "",
|
||||
directory: "", // where the minecraft jar and version json are located.
|
||||
directory: "", // where the Minecraft jar and version json are located.
|
||||
libraries: "",
|
||||
natives: "",
|
||||
assetRoot: "",
|
||||
cwd: "", // working directory of the java process
|
||||
classes: [], // all class paths are required if you use this.
|
||||
minArgs: 11,
|
||||
}
|
||||
|
|
|
@ -113,7 +113,8 @@ class MCLCore extends EventEmitter {
|
|||
this.emit('arguments', launchArguments);
|
||||
this.emit('debug', launchArguments.join(' '));
|
||||
|
||||
const minecraft = child.spawn(this.options.javaPath ? this.options.javaPath : 'java', launchArguments);
|
||||
const minecraft = child.spawn(this.options.javaPath ? this.options.javaPath : 'java', launchArguments,
|
||||
{cwd: this.options.overrides.cwd || this.options.root});
|
||||
minecraft.stdout.on('data', (data) => this.emit('data', data));
|
||||
minecraft.stderr.on('data', (data) => this.emit('data', data));
|
||||
minecraft.on('close', (code) => this.emit('close', code));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "minecraft-launcher-core",
|
||||
"version": "3.7.3",
|
||||
"version": "3.7.4",
|
||||
"description": "Lightweight module that downloads and runs Minecraft using javascript / NodeJS",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
|
|
Loading…
Add table
Reference in a new issue