classNeoForge#

class NeoForge(
version: str,
minecraft: str,
repository: str = 'https://maven.neoforged.net/releases',
java_index_url: str = 'https://launchermeta.mojang.com/v1/products/java-runtime/2ec0cc96c44e5a76b9c8b7c39df7210883d12871/all.json',
)#

The NeoForge loader.

repository#

The Maven repository that hosts the installers.

Type:

str

classmethod from_version(
version: Version,
minecraft: str,
) → Self | None#

Recognise NeoForge by the version it passes the game, or its library.

classmethod available(
minecraft: str,
*,
session: Session | None = None,
repository: str | None = None,
) → list[LoaderVersion]#

List NeoForge’s versions for a Minecraft version, newest first.

NeoForge publishes one unsorted list for every Minecraft version, so the game version is worked out from each version number. Versions marked beta are pre-releases, and the newest stable one is recommended.

Parameters:
  • minecraft (str) – The Minecraft version.

  • session (Session | None) – The session to use. A temporary one is created if omitted.

  • repository (str | None) – The Maven repository. Defaults to NeoForge’s own.

Returns:

The versions, empty if NeoForge has none for that Minecraft version.

Raises:

NetworkError – The version list could not be fetched.

Return type:

list[LoaderVersion]

expected_id() → str#

Return the version id that this version’s installer declares.

installer_url() → str#

Return where this version’s installer jar is published.