3.11.6 - Fabric support

Defaults back to normal MC jar if a custom one doesnt exist.
This commit is contained in:
Pierce 2020-01-04 18:21:12 -05:00
parent f9b7032ded
commit e2f7e1088c
4 changed files with 7 additions and 5 deletions

View file

@ -2,7 +2,7 @@
##### This project is complete for now. ##### This project is complete for now.
[![Build Status](https://travis-ci.com/Pierce01/MinecraftLauncher-core.svg?branch=master)](https://travis-ci.com/Pierce01/MinecraftLauncher-core) [![Build Status](https://travis-ci.com/Pierce01/MinecraftLauncher-core.svg?branch=master)](https://travis-ci.com/Pierce01/MinecraftLauncher-core)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![version](https://img.shields.io/badge/stable_version-3.11.3-blue) ![version](https://img.shields.io/badge/stable_version-3.11.5-blue)
![badge](https://img.shields.io/badge/ncurses-not_supported-purple) ![badge](https://img.shields.io/badge/ncurses-not_supported-purple)
MCLC (Minecraft Launcher Core) is a NodeJS solution for launching modded and vanilla Minecraft without having to download and format everything yourself. MCLC (Minecraft Launcher Core) is a NodeJS solution for launching modded and vanilla Minecraft without having to download and format everything yourself.
@ -115,8 +115,7 @@ let opts = {
#### Notes #### Notes
##### Custom ##### Custom
If you are loading up a client outside of vanilla Minecraft or Forge (Optifine and for an example), you'll need to download the needed files yourself If you are loading up a client outside of vanilla Minecraft or Forge (Optifine and for an example), you'll need to download the needed files yourself if you don't provide downloads url downloads like Forge and Fabric. If no version jar is specified, MCLC will default back to the normal MC jar so mods like Fabric work.
if you don't provide downloads url downloads like Forge and Fabric. Still need to provide the version jar.
##### Installer ##### Installer
You'll need to provide the folder created in the versions if you're running the new forge like so You'll need to provide the folder created in the versions if you're running the new forge like so
```json ```json

View file

@ -265,6 +265,8 @@ class Handler {
}); });
await Promise.all(stat.map(async (native) => { await Promise.all(stat.map(async (native) => {
// Edge case on some systems where native is undefined and throws an error, this should fix it.
if(!native) return;
const name = native.path.split('/').pop(); const name = native.path.split('/').pop();
await this.downloadAsync(native.url, nativeDirectory, name, true, 'natives'); await this.downloadAsync(native.url, nativeDirectory, name, true, 'natives');
if (!await this.checkSum(native.sha1, path.join(nativeDirectory, name))) { if (!await this.checkSum(native.sha1, path.join(nativeDirectory, name))) {

View file

@ -106,7 +106,8 @@ class MCLCore extends EventEmitter {
classPaths.push(forge.forge.mainClass) classPaths.push(forge.forge.mainClass)
} else { } else {
const file = custom || versionFile; const file = custom || versionFile;
const jar = fs.existsSync(mcPath) ? `${mcPath}${separator}` : ''; // So mods like fabric work.
const jar = fs.existsSync(mcPath) ? `${mcPath}${separator}` : `${path.join(directory, `${this.options.version.number}.jar`)}${separator}`;
classPaths.push(`${jar}${classes.join(separator)}`); classPaths.push(`${jar}${classes.join(separator)}`);
classPaths.push(file.mainClass); classPaths.push(file.mainClass);
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "minecraft-launcher-core", "name": "minecraft-launcher-core",
"version": "3.11.5", "version": "3.11.6",
"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": {