Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Inject jvm args at the end, allowing users to overwrite lunars args
Browse files Browse the repository at this point in the history
  • Loading branch information
Nilsen84 committed Aug 2, 2023
1 parent 25da660 commit 66591fa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gui/inject/renderer-inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ cp.spawn = function (cmd, args, opts) {

let lcqtOpts = ipcRenderer.sendSync('LCQT_GET_LAUNCH_OPTIONS')

args.splice(
Math.max(0, args.indexOf('-cp')),
0,
...lcqtOpts.jvmArgs
)

return originalSpawn(
lcqtOpts.customJvm || cmd,
[...lcqtOpts.jvmArgs, ...args, ...lcqtOpts.minecraftArgs],
[...args, ...lcqtOpts.minecraftArgs],
opts
)
}
Expand Down

0 comments on commit 66591fa

Please sign in to comment.