From c41f74f478885a12e8cb00e558a1b8ad4d0957d6 Mon Sep 17 00:00:00 2001 From: Daniel Scalzi Date: Sun, 30 Apr 2017 18:28:43 -0400 Subject: [PATCH] Added more dynamic values for game launch, hotfix for electron installation bug. --- app/assets/js/launchprocess.js | 17 ++++++++--------- package.json | 3 ++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/assets/js/launchprocess.js b/app/assets/js/launchprocess.js index 863d9a87..467e52db 100644 --- a/app/assets/js/launchprocess.js +++ b/app/assets/js/launchprocess.js @@ -8,13 +8,14 @@ const unzip = require('unzip') const mkpath = require('mkdirp'); exports.launchMinecraft = function(versionData, basePath){ - const authPromise = mojang.auth('EMAIL', 'PASS', uuidV4(), { + const authPromise = mojang.auth('nytrocraft@live.com', 'applesrgood123', uuidV4(), { name: 'Minecraft', version: 1 }) authPromise.then(function(data){ const hardcodedargs = '' const args = finalizeArguments(versionData, data, basePath) + //console.log(data) //console.log(args) //TODO make this dynamic const child = child_process.spawn('C:\\Program Files\\Java\\jre1.8.0_131\\bin\\javaw.exe', args) @@ -23,6 +24,8 @@ exports.launchMinecraft = function(versionData, basePath){ finalizeArguments = function(versionData, authData, basePath){ const mcArgs = versionData['minecraftArguments'] + console.log(authData) + const gameProfile = authData['selectedProfile'] const regex = new RegExp('\\${*(.*)}') const argArr = mcArgs.split(' ') argArr.unshift('net.minecraft.client.main.Main') @@ -37,12 +40,10 @@ finalizeArguments = function(versionData, authData, basePath){ for(let i=0; i