mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2024-11-22 12:16:21 +03:00
Simplified overrides. added more keywords
This commit is contained in:
parent
72f6104763
commit
eec04746e6
2 changed files with 12 additions and 15 deletions
|
@ -13,20 +13,15 @@ class MCLCore extends EventEmitter {
|
||||||
async launch(options) {
|
async launch(options) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
this.options.root = path.resolve(this.options.root);
|
this.options.root = path.resolve(this.options.root);
|
||||||
|
|
||||||
|
// Simplified overrides so launcher devs can set the paths to what ever they want. see docs for variable names.
|
||||||
if(!this.options.overrides) this.options.overrides = { url: {} };
|
if(!this.options.overrides) this.options.overrides = { url: {} };
|
||||||
this.options.overrides = {
|
if(!this.options.overrides.url) this.options.overrides.url = {};
|
||||||
minecraftJar: this.options.overrides.minecraftJar ? path.join(this.options.root, this.options.overrides.minecraftJar): null,
|
this.options.overrides.url = {
|
||||||
versionJson: this.options.overrides.versionJson ? path.join(this.options.root, this.options.overrides.versionJson): null,
|
meta: this.options.overrides.url.meta || "https://launchermeta.mojang.com",
|
||||||
directory: this.options.overrides.directory ? path.join(this.options.root, this.options.overrides.directory): null,
|
resource: this.options.overrides.url.resource || "https://resources.download.minecraft.net",
|
||||||
libraries: this.options.overrides.libraries ? path.join(this.options.root, this.options.overrides.libraries): null,
|
mavenForge: this.options.overrides.url.mavenForge || "http://files.minecraftforge.net/maven/",
|
||||||
natives: this.options.overrides.natives ? path.join(this.options.root, this.options.overrides.natives): null,
|
defaultRepoForge: this.options.overrides.url.defaultRepoForge || "https://libraries.minecraft.net/"
|
||||||
assetRoot: this.options.overrides.assetRoot ? path.join(this.options.root, this.options.overrides.assetRoot): null,
|
|
||||||
url: {
|
|
||||||
meta: this.options.overrides.url.meta || "https://launchermeta.mojang.com",
|
|
||||||
resource: this.options.overrides.url.resource || "https://resources.download.minecraft.net",
|
|
||||||
mavenForge: this.options.overrides.url.mavenForge || "http://files.minecraftforge.net/maven/",
|
|
||||||
defaultRepoForge: this.options.overrides.url.defaultRepoForge || "https://libraries.minecraft.net/"
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
this.handler = new handler(this);
|
this.handler = new handler(this);
|
||||||
// Lets the events register. our magic switch!
|
// Lets the events register. our magic switch!
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "minecraft-launcher-core",
|
"name": "minecraft-launcher-core",
|
||||||
"version": "3.9.0",
|
"version": "3.9.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": {
|
||||||
|
@ -21,7 +21,9 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"minecraft",
|
"minecraft",
|
||||||
"minecraft-launcher-node",
|
"minecraft-launcher-node",
|
||||||
"minecraft-launcher"
|
"minecraft-launcher",
|
||||||
|
"launcher",
|
||||||
|
"minecraft-forge"
|
||||||
],
|
],
|
||||||
"author": "Pierce Harriz",
|
"author": "Pierce Harriz",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
Loading…
Add table
Reference in a new issue