mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2024-11-22 20:26:22 +03:00
fix MC lockup for OSX
This commit is contained in:
parent
4a30dd96d5
commit
b850909f5a
3 changed files with 8 additions and 4 deletions
|
@ -177,8 +177,9 @@ class Handler {
|
||||||
|
|
||||||
await Promise.all(this.version.libraries.map(async (lib) => {
|
await Promise.all(this.version.libraries.map(async (lib) => {
|
||||||
if (!lib.downloads.classifiers) return;
|
if (!lib.downloads.classifiers) return;
|
||||||
const type = `natives-${this.getOS()}`;
|
const native = this.getOS() === 'osx'
|
||||||
const native = lib.downloads.classifiers[type];
|
? lib.downloads.classifiers['natives-osx'] || lib.downloads.classifiers['natives-macos']
|
||||||
|
: lib.downloads.classifiers[`natives-${this.getOS()}`];
|
||||||
|
|
||||||
if (native) {
|
if (native) {
|
||||||
const name = native.path.split('/').pop();
|
const name = native.path.split('/').pop();
|
||||||
|
|
|
@ -78,7 +78,10 @@ class MCLCore extends EventEmitter {
|
||||||
`-Xmx${this.options.memory.max}M`,
|
`-Xmx${this.options.memory.max}M`,
|
||||||
`-Xms${this.options.memory.min}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);
|
if(this.options.customArgs) jvm = jvm.concat(this.options.customArgs);
|
||||||
|
|
||||||
const classes = await handler.cleanUp(await this.handler.getClasses());
|
const classes = await handler.cleanUp(await this.handler.getClasses());
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "minecraft-launcher-core",
|
"name": "minecraft-launcher-core",
|
||||||
"version": "3.7.0",
|
"version": "3.7.1",
|
||||||
"description": "Lightweight module that downloads and runs Minecraft using javascript / NodeJS",
|
"description": "Lightweight module that downloads and runs Minecraft using javascript / NodeJS",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue