Meta file generator for PolyMC
cozyGalvinism ded45f4934 Initial commit | 2 jaren geleden | |
---|---|---|
src | 2 jaren geleden | |
.gitignore | 2 jaren geleden | |
Cargo.lock | 2 jaren geleden | |
Cargo.toml | 2 jaren geleden | |
LICENSE | 2 jaren geleden | |
README.md | 2 jaren geleden |
Meta file generator for PolyMC.
Well yes and no. While it's true that they work, they're badly written and almost unmaintanable due to a lack of proper documentation.
I'm making the effort to fully explain what is going on in the scripts and rewrite them as a Rust application. Rewriting the metadata generation in Rust is faster and easily deployable.
Another reason is that PolyMC might use a different meta format in the future. In which case this repository will be updated.
mojang/version_manifest_v2.json
, if it exists.https://launchermeta.mojang.com/mc/game/version_manifest_v2.json
.mojang/versions/{version_id}.json
.mojang/assets/{asset_id}.json
.mojang/version_manifest_v2.json
https://files.minecraftforge.net/net/minecraftforge/forge/maven-metadata.json
.https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json
.^(?P<mc>[0-9a-zA-Z_\\.]+)-(?P<ver>[0-9\\.]+\\.(?P<build>[0-9]+))(-(?P<branch>[a-zA-Z0-9\\.]+))?$
) and download the manifest file (since this step also is a little bigger, I will subsection here again):
forge/files_manifests/{long_version}.json
. If it doesn't, download it from https://files.minecraftforge.net/net/minecraftforge/forge/{long_version}/meta.json
(long_version
being a full Forge version string like 1.18.1-39.0.64
).forge/maven-metadata.json
), promotion data (forge/promotion_slim.json
) and the derived index (forge/derived_index.json
) to the respective file locations.version.json
inside under forge/version_manifests/{long_version}.json
, try to parse the installer_profile.json
and save it under forge/installer_manifests/{long_version}.json
and generate a SHA1 and SHA256 hash digest and save those with the installer file size to forge/installer_info/{long_version}.json
.static/forge-legacyinfo.json
exists and if it doesn't, download the legacy versions and generate legacy info by finding the newest file inside the JAR file, getting the timestamp of the file and generate SHA1 and SHA256 digests and save them under static/forge-legacyinfo.json
.