fix MC lockup for OSX

This commit is contained in:
Pierce 2019-07-23 16:27:33 -04:00
parent 4a30dd96d5
commit b850909f5a
3 changed files with 8 additions and 4 deletions

View file

@ -177,8 +177,9 @@ class Handler {
await Promise.all(this.version.libraries.map(async (lib) => {
if (!lib.downloads.classifiers) return;
const type = `natives-${this.getOS()}`;
const native = lib.downloads.classifiers[type];
const native = this.getOS() === 'osx'
? lib.downloads.classifiers['natives-osx'] || lib.downloads.classifiers['natives-macos']
: lib.downloads.classifiers[`natives-${this.getOS()}`];
if (native) {
const name = native.path.split('/').pop();

View file

@ -78,7 +78,10 @@ class MCLCore extends EventEmitter {
`-Xmx${this.options.memory.max}M`,
`-Xms${this.options.memory.min}M`
];
jvm.push(await this.handler.getJVM());
if(this.handler.getOS() === 'osx') {
if(parseInt(versionFile.id.split('.')[1]) > 12) jvm.push(await this.handler.getJVM());
} else jvm.push(await this.handler.getJVM());
if(this.options.customArgs) jvm = jvm.concat(this.options.customArgs);
const classes = await handler.cleanUp(await this.handler.getClasses());

View file

@ -1,6 +1,6 @@
{
"name": "minecraft-launcher-core",
"version": "3.7.0",
"version": "3.7.1",
"description": "Lightweight module that downloads and runs Minecraft using javascript / NodeJS",
"main": "index.js",
"dependencies": {