Support vanilla profile launches
Some checks failed
Build / release (macos-latest) (push) Has been cancelled
Build / release (ubuntu-latest) (push) Has been cancelled
Build / release (windows-latest) (push) Has been cancelled
Windows Smoke Test / windows-smoke (push) Has been cancelled

This commit is contained in:
2026-05-06 05:11:36 +09:00
parent 316ce0e0dc
commit 555a5ea099
3 changed files with 103 additions and 54 deletions

View File

@@ -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) {