forge
Note
Before using this module, please read this comment from the forge developers:
Please do not automate the download and installation of Forge.
Our efforts are supported by ads from the download page.
If you MUST automate this, please consider supporting the project through https://www.patreon.com/LexManos/
It’s your choice, if you want to respect that and support forge.
forge contains functions for dealing with the Forge modloader
- install_forge_version(versionid: str, path: str | PathLike, callback: CallbackDict | None = None, java: str | PathLike | None = None) None
Installs the given Forge version
- Parameters:
versionid (str) – A Forge Version. You can get a List of Forge versions using
list_forge_versions()path (str | PathLike) – The path to your Minecraft directory
callback (CallbackDict | None) – The same dict as for
install_minecraft_version()java (str | PathLike | None) – A Path to a custom Java executable
- Return type:
None
Raises a
VersionNotFoundexception when the given forge version is not found
- run_forge_installer(version: str, java: str | PathLike | None = None) None
Run the forge installer of the given forge version
- Parameters:
version (str) – A Forge Version. You can get a List of Forge versions using
list_forge_versions()java (str | PathLike | None) – A Path to a custom Java executable
- Return type:
None
- list_forge_versions() list[str]
Returns a list of all forge versions
- Return type:
list[str]
- find_forge_version(vanilla_version: str) str | None
Find the latest forge version that is compatible to the given vanilla version
- Parameters:
vanilla_version (str) – A vanilla Minecraft version
- Return type:
str | None
- is_forge_version_valid(forge_version: str) bool
Checks if a forge version is valid
- Parameters:
forge_version (str) – A Forge Version
- Return type:
bool
- supports_automatic_install(forge_version: str) bool
Checks if install_forge_version() supports the given forge version
- Parameters:
forge_version (str) – A Forge Version
- Return type:
bool
- forge_to_installed_version(forge_version: str) str
Returns the Version under which Forge will be installed from the given Forge version.
- Parameters:
forge_version (str) – A Forge Version
- Return type:
str
Raises a ValueError if the Version is invalid.