@xmcl/forge-installer
Forge installer
Last updated 5 hours ago by ci010 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @xmcl/forge-installer 
SYNC missed versions from official npm registry.

Forge-installer Module

npm version npm Build Status

This is a sub-module belong to minecraft-launcher-core module. You can still use this individually.

New Forge Installing process

The module have three stage for installing new forge (mcversion >= 1.13)

  1. Deploy forge installer jar
    1. Download installer jar
    2. Extract forge universal jar files in installer jar into .minecraft/libraries
    3. Extract version.json into target version folder, .minecraft/versions/<ver>/<ver>.json
    4. Extract installer_profile.json into target version folder, .minecraft/versions/<ver>/installer_profile.json
  2. Download Dependencies
    1. Merge libraires in installer_profile.json and <ver>.json
    2. Download them
  3. Post processing forge jar
    1. Parse installer_profile.json
    2. Get the processors info and execute all of them.

The ForgeInstaller.install will do all of them.

The ForgeInstaller.installByInstallerPartial will do 2 and 3.

If you want to just do step 3, you can use ForgeInstaller.diagnose and find which libraries is break and use ForgeInstaller.postProcess to handle it.

Forge Installation

    import { ForgeInstaller, ForgeWebPage } from "@xmcl/forge-installer";
    import { MinecraftLocation } from "@xmcl/util";
    const page: ForgeWebPage = await ForgeWebPage.getWebPage();
    const minecraftLocation: MinecraftLocation;
    const mcversion = page.mcversion; // mc version
    const firstVersionOnPage: ForgeWebPage.Version = page.versions[0];
    await ForgeInstaller.install(firstVersionOnPage, minecraftLocation);

Get the forge version info and install forge from it.

Notice that this installation doesn't ensure full libraries installation. Please run Installer.installDependencies afther that.

The new 1.13 forge installation process requires java to run. Either you have java executable in your environment variable PATH, or you can assign java location by ForgeInstaller.install(forgeVersionMeta, minecraftLocation, { java: yourJavaExecutablePath });.

If you use this auto installation process to install forge, please checkout Lex's Patreon. Consider support him to maintains forge.

Current Tags

  • 0.2.6                                ...           latest (5 hours ago)

29 Versions

  • 0.2.6                                ...           5 hours ago
  • 0.2.5                                ...           4 days ago
  • 0.2.4                                ...           11 days ago
  • 0.2.3                                ...           12 days ago
  • 0.2.2                                ...           12 days ago
  • 0.2.1                                ...           12 days ago
  • 0.2.0                                ...           12 days ago
  • 0.1.5                                ...           12 days ago
  • 0.1.4                                ...           12 days ago
  • 0.1.3                                ...           12 days ago
  • 0.1.2                                ...           12 days ago
  • 0.1.1                                ...           12 days ago
  • 0.1.0                                ...           12 days ago
  • 0.0.16                                ...           15 days ago
  • 0.0.15                                ...           16 days ago
  • 0.0.14                                ...           a month ago
  • 0.0.13                                ...           a month ago
  • 0.0.12                                ...           a month ago
  • 0.0.11                                ...           a month ago
  • 0.0.10                                ...           a month ago
  • 0.0.9                                ...           a month ago
  • 0.0.8                                ...           a month ago
  • 0.0.7                                ...           a month ago
  • 0.0.6                                ...           a month ago
  • 0.0.5                                ...           a month ago
  • 0.0.4                                ...           a month ago
  • 0.0.3                                ...           a month ago
  • 0.0.2                                ...           a month ago
  • 0.0.1                                ...           2 months ago
Maintainers (1)
Downloads
Today 14
This Week 15
This Month 233
Last Day 0
Last Week 22
Last Month 211
Dependencies (9)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |