From dd8b80d69d264c2cc8d0b63bf3359f4ac6d3c0ac Mon Sep 17 00:00:00 2001 From: Pierce Date: Sat, 6 Apr 2019 13:03:01 -0400 Subject: [PATCH] fallback if modification doesnt have the proper arguments --- components/handler.js | 4 +++- package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/handler.js b/components/handler.js index eb64973..f913084 100644 --- a/components/handler.js +++ b/components/handler.js @@ -256,9 +256,11 @@ module.exports.getLaunchOptions = function (version, modification, options) { return new Promise(resolve => { let type = modification || version; - const arguments = type.minecraftArguments ? type.minecraftArguments.split(' ') : type.arguments.game; + let arguments = type.minecraftArguments ? type.minecraftArguments.split(' ') : type.arguments.game; const assetPath = version.assets === "legacy" || version.assets === "pre-1.6" ? path.join(options.root, 'assets', 'legacy') : path.join(options.root, 'assets'); + if(arguments.length < 9) arguments = arguments.concat(version.minecraftArguments ? version.minecraftArguments.split(' ') : version.arguments.game); + const fields = { '${auth_access_token}': options.authorization.access_token, '${auth_session}': options.authorization.access_token, diff --git a/package.json b/package.json index e7bc03a..5c59c8f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minecraft-launcher-core", - "version": "2.5.0", + "version": "2.5.1", "description": "Module that downloads Minecraft assets and runs Minecraft. Also Supports Forge", "main": "index.js", "dependencies": {