Update License and reformat some things

Not a major change

also removed the forced `-Xincgc` .
This commit is contained in:
Pierce 2019-04-18 17:35:39 -04:00
parent ff8637536b
commit cd698c9f1b
4 changed files with 9 additions and 12 deletions

View file

@ -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

View file

@ -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};

View file

@ -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);

View file

@ -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": {