Add a gameDirectory to your options

This commit is contained in:
MT224244 2020-08-20 03:27:36 +09:00
parent ef45a1d741
commit 5b21305f99
3 changed files with 5 additions and 1 deletions

View file

@ -497,7 +497,7 @@ class Handler {
'${user_type}': 'mojang',
'${version_name}': this.options.version.number,
'${assets_index_name}': this.version.assetIndex.id,
'${game_directory}': this.options.root,
'${game_directory}': this.options.gameDirectory || this.options.root,
'${assets_root}': assetPath,
'${game_assets}': assetPath,
'${version_type}': this.options.version.type

View file

@ -8,6 +8,9 @@ class MCLCore extends EventEmitter {
async launch (options) {
this.options = options
this.options.root = path.resolve(this.options.root)
if (this.options.gameDirectory) {
this.options.gameDirectory = path.resolve(this.options.gameDirectory)
}
this.options.overrides = {
detached: true,
...this.options.overrides,