mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2024-11-25 13:36:21 +03:00
Update License and reformat some things
Not a major change also removed the forced `-Xincgc` .
This commit is contained in:
parent
ff8637536b
commit
cd698c9f1b
4 changed files with 9 additions and 12 deletions
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2018
|
Copyright (c) 2019 Pierce Harriz
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -3,7 +3,7 @@ const uuid = require('uuid/v1');
|
||||||
const api_url = "https://authserver.mojang.com";
|
const api_url = "https://authserver.mojang.com";
|
||||||
|
|
||||||
|
|
||||||
function getAuth(username, password) {
|
module.exports.getAuth = function (username, password) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
if(!password) {
|
if(!password) {
|
||||||
const user = {
|
const user = {
|
||||||
|
@ -49,9 +49,9 @@ function getAuth(username, password) {
|
||||||
resolve(userProfile);
|
resolve(userProfile);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
function validate(access_token) {
|
module.exports.validate = function (access_token) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
const requestObject = {
|
const requestObject = {
|
||||||
url: api_url + "/validate",
|
url: api_url + "/validate",
|
||||||
|
@ -66,9 +66,9 @@ function validate(access_token) {
|
||||||
if(!body) resolve(true); else resolve(false);
|
if(!body) resolve(true); else resolve(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
function refreshAuth(accessToken, clientToken, selectedProfile) {
|
module.exports.refreshAuth = function (accessToken, clientToken, selectedProfile) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
const requestObject = {
|
const requestObject = {
|
||||||
url: api_url + "/refresh",
|
url: api_url + "/refresh",
|
||||||
|
@ -98,6 +98,4 @@ function refreshAuth(accessToken, clientToken, selectedProfile) {
|
||||||
resolve(userProfile);
|
resolve(userProfile);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
module.exports = {getAuth, validate, refreshAuth};
|
|
|
@ -38,8 +38,7 @@ module.exports = async function (options) {
|
||||||
'-Dfml.ignoreInvalidMinecraftCertificates=true',
|
'-Dfml.ignoreInvalidMinecraftCertificates=true',
|
||||||
`-Djava.library.path=${nativePath}`,
|
`-Djava.library.path=${nativePath}`,
|
||||||
`-Xmx${options.memory.max}M`,
|
`-Xmx${options.memory.max}M`,
|
||||||
`-Xms${options.memory.min}M`,
|
`-Xms${options.memory.min}M`
|
||||||
'-Xincgc'
|
|
||||||
];
|
];
|
||||||
jvm.push(await handler.getJVM(versionFile, options));
|
jvm.push(await handler.getJVM(versionFile, options));
|
||||||
if(options.customArgs) jvm = jvm.concat(options.customArgs);
|
if(options.customArgs) jvm = jvm.concat(options.customArgs);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "minecraft-launcher-core",
|
"name": "minecraft-launcher-core",
|
||||||
"version": "2.5.2",
|
"version": "2.5.3",
|
||||||
"description": "Module that downloads Minecraft assets and runs Minecraft. Also Supports Forge",
|
"description": "Module that downloads Minecraft assets and runs Minecraft. Also Supports Forge",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue