npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@bauxite/launcher-api-forge

v0.5.0

Published

> Provides high-level API for managing Forge Minecraft client instances. > Works as a plugin for `launcher-api`. > Designed to be consumed by `launcher-ui` and `launcher-cli`.

Downloads

9

Readme

launcher-api-forge

Provides high-level API for managing Forge Minecraft client instances. Works as a plugin for launcher-api. Designed to be consumed by launcher-ui and launcher-cli.

Table of Contents

Installation

$ yarn add @bauxite/launcher-api-forge

or

$ npm install --save @bauxite/launcher-api-forge

API Overview

All methods described below return a Promise unless otherwise specified. "Return" implies the Promise having been resolved, and "throw" implies the Promise having been rejected.

Forge Versions

getForgeVersions (async)

Fetch a list of all available versions of Forge.

Return value

Returns an array of objects, each representing a version of Forge, comprising:

  • ID: The version number, i.e. 14.23.1.2555
  • build: The build number
  • minecraftVersionID: The supported version of Minecraft
  • branch: Usually null ─ the branch on which this version was released
  • releasedAt: A Date object representing the time this version was relesed
  • downloads: An array of objects, each representing a build artefact for this version. Each object contains:
    • ID: A unique identifier for this build, comprising the version ID, and the download name
    • name: The type of build artefact, i.e. universal, installer or mdk
    • path: The filename of the build artefact
    • sha1: A SHA1 hash of the build artefact
    • url: The remote URL from which the artefact can be downloaded
  • latest: If true, this is the latest unstable available build
  • recommended: If true, this is the latest recommended available build

The versions are in descending order of released date (releasedAt).

getForgeVersionsByID (async)

Finds a version of Forge by its ID.

Parameters
  • ID: The version ID to fetch details for
Return value

Returns an element of the array returned by getForgeVersions, or null if the supplied ID does not match any versions.

getForgeVersionsForMinecraftVersion (async)

Finds all versions of Forge that are compatible with the supplied Minecraft version.

Parameters
  • versionID: The Minecraft version ID
Return value

Returns a subset of the array returned by getForgeVersions, or an empty array if no compatible versions exist.

Installing Forge

installForge (async)

Installs (or updates) Forge to a Bauxite-managed Minecraft instance.

Parameters
  • directory: The directory of the Minecraft instance to install Forge to
  • forgeVersionID: The version ID of Forge to install
Return value

Returns an object identical to that of getInstance from launcher-api, with the addition of a forgeVersionID field. For example:

{
  "ID": "twitchy-creeper-23",
  "directory": "/home/<user>/.bauxite/instances/twitchy-creeper-23",
  "versionID": "1.12.2",
  "forgeVersionID": "14.23.1.2555"
}

Launching Forge

Launching Forge instances is handled by startInstance in launcher-api ─ only the method for generating launch arguments is augmented to allow this.

generateForgeLaunchArguments (async)

An override for generateLaunchArguments, automatically called when launching Forge-enabled instances.

Parameters

Accepts a single parameter of an object with the 3 following fields:

  • instance: An object representing the instance to launch, as returned by getInstance from launcher-api.
  • profile: An object representing the user profile to launch with, as returned by the getProfile methods from launcher-api.
  • version: An object representing the version manifest of the instance, as returned by getVersionManifest from launcher-api.
Return value

An array of command-line arguments to pass to the Java executable installed on the system, such that the Forge instance will be launched.