mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2024-11-22 20:26:22 +03:00
Change required args from 9 to 5. New event
Event allows you to see the launch arguments for debugging.
This commit is contained in:
parent
4b2393544b
commit
e207529dac
3 changed files with 3 additions and 1 deletions
|
@ -89,6 +89,7 @@ If you are loading up a client outside of vanilla Minecraft and Forge (Optifine
|
||||||
|
|
||||||
| Event Name | Type | Description |
|
| Event Name | Type | Description |
|
||||||
|-------------------|---------|---------------------------------------------------------------------------------------|
|
|-------------------|---------|---------------------------------------------------------------------------------------|
|
||||||
|
| `arguments` | Object | Emitted when launch arguments are set for the Minecraft Jar. |
|
||||||
| `data` | Buffer | Emitted when information is returned from the Minecraft Process |
|
| `data` | Buffer | Emitted when information is returned from the Minecraft Process |
|
||||||
| `close` | Integer | Code number that is returned by the Minecraft Process |
|
| `close` | Integer | Code number that is returned by the Minecraft Process |
|
||||||
| `error` | String | Emitted when the Minecraft Process errors |
|
| `error` | String | Emitted when the Minecraft Process errors |
|
||||||
|
|
|
@ -262,7 +262,7 @@ module.exports.getLaunchOptions = function (version, modification, options) {
|
||||||
let 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');
|
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);
|
if(arguments.length < 5) arguments = arguments.concat(version.minecraftArguments ? version.minecraftArguments.split(' ') : version.arguments.game);
|
||||||
|
|
||||||
const fields = {
|
const fields = {
|
||||||
'${auth_access_token}': options.authorization.access_token,
|
'${auth_access_token}': options.authorization.access_token,
|
||||||
|
|
|
@ -61,6 +61,7 @@ module.exports = async function (options) {
|
||||||
const launchOptions = await handler.getLaunchOptions(versionFile, modification, options);
|
const launchOptions = await handler.getLaunchOptions(versionFile, modification, options);
|
||||||
|
|
||||||
const launchArguments = args.concat(jvm, classPaths, launchOptions);
|
const launchArguments = args.concat(jvm, classPaths, launchOptions);
|
||||||
|
event.emit('arguments', launchArguments);
|
||||||
|
|
||||||
const minecraft = child.spawn(options.javaPath ? options.javaPath : 'java', launchArguments);
|
const minecraft = child.spawn(options.javaPath ? options.javaPath : 'java', launchArguments);
|
||||||
minecraft.stdout.on('data', (data) => event.emit('data', data));
|
minecraft.stdout.on('data', (data) => event.emit('data', data));
|
||||||
|
|
Loading…
Add table
Reference in a new issue