Support vanilla profile launches
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
(() => {
|
||||
// Requirements
|
||||
require('./assets/js/vanillapatch')
|
||||
|
||||
const path = require('path')
|
||||
const { URL } = require('url')
|
||||
const {
|
||||
MojangRestAPI
|
||||
@@ -689,7 +692,15 @@ async function dlAsync(login = true) {
|
||||
DistroAPI.isDevMode()
|
||||
)
|
||||
|
||||
fullRepairModule.spawnReceiver()
|
||||
const receiverPatchPath = path.join(__dirname, '..', 'vanillapatch.js')
|
||||
const existingNodeOptions = process.env.NODE_OPTIONS?.trim()
|
||||
const receiverNodeOptions = `--require=\"${receiverPatchPath}\"`
|
||||
|
||||
fullRepairModule.spawnReceiver({
|
||||
NODE_OPTIONS: existingNodeOptions != null && existingNodeOptions.length > 0
|
||||
? `${existingNodeOptions} ${receiverNodeOptions}`
|
||||
: receiverNodeOptions
|
||||
})
|
||||
|
||||
fullRepairModule.childProcess.on('error', (err) => {
|
||||
loggerLaunchSuite.error('Error during launch', err)
|
||||
@@ -751,7 +762,7 @@ async function dlAsync(login = true) {
|
||||
serv.rawServer.id
|
||||
)
|
||||
|
||||
const modLoaderData = await distributionIndexProcessor.loadModLoaderVersionJson(serv)
|
||||
const modLoaderData = await distributionIndexProcessor.loadModLoaderVersionJson()
|
||||
const versionData = await mojangIndexProcessor.getVersionJson()
|
||||
|
||||
if(login) {
|
||||
|
||||
Reference in New Issue
Block a user