{"id":19412113,"url":"https://github.com/polyfrost/oneconfigloader","last_synced_at":"2025-06-25T02:33:25.089Z","repository":{"id":37007525,"uuid":"489953065","full_name":"Polyfrost/OneConfigLoader","owner":"Polyfrost","description":"The loading stages for OneConfig. Contains the code for downloading \u0026 (auto-)updating OneConfig, as well as the embedded loader mod.","archived":false,"fork":false,"pushed_at":"2025-05-14T05:02:56.000Z","size":955,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"modern","last_synced_at":"2025-05-14T06:33:03.819Z","etag":null,"topics":["java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Polyfrost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-08T13:35:07.000Z","updated_at":"2025-05-14T05:02:59.000Z","dependencies_parsed_at":"2023-02-18T14:45:25.599Z","dependency_job_id":"69b5eaca-70f6-4b8d-8241-75b4a1f34d9e","html_url":"https://github.com/Polyfrost/OneConfigLoader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Polyfrost/OneConfigLoader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyfrost%2FOneConfigLoader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyfrost%2FOneConfigLoader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyfrost%2FOneConfigLoader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyfrost%2FOneConfigLoader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Polyfrost","download_url":"https://codeload.github.com/Polyfrost/OneConfigLoader/tar.gz/refs/heads/modern","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyfrost%2FOneConfigLoader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261791118,"owners_count":23210100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java"],"created_at":"2024-11-10T12:25:04.430Z","updated_at":"2025-06-25T02:33:25.079Z","avatar_url":"https://github.com/Polyfrost.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OneConfig Early Loading Stages\n\n![Repository badge](https://repo.polyfrost.org/api/badge/latest/snapshots/org/polyfrost/oneconfig/1.8.9-forge?color=1452cc\u0026name=OneConfig)\n![Loader repository badge](https://repo.polyfrost.org/api/badge/latest/snapshots/org/polyfrost/oneconfig/stage0?color=1452cc\u0026name=Loader%20(for%20Legacy%20Forge))\n\n![Stage0 repository badge](https://repo.polyfrost.org/api/badge/latest/snapshots/org/polyfrost/oneconfig/stage0?color=1452cc\u0026name=Loader%20Stage0)\n![Stage1 repository badge](https://repo.polyfrost.org/api/badge/latest/snapshots/org/polyfrost/oneconfig/stage1?color=1452cc\u0026name=Loader%20Stage1)\n![Relaunch repository badge](https://repo.polyfrost.org/api/badge/latest/snapshots/org/polyfrost/oneconfig/relaunch?color=1452cc\u0026name=Loader%20Relaunch)\n\nThis repository contains the source code for early loading of [OneConfig].\n\nThis below documentation is not intended for end users or consuming developers of OneConfig, check out the\n[Polyfrost Documentation] instead.\n\n## Overview\n\n### Design principles:\n- No hardcoding\n  - If a class entrypoint is needed, it should be specified in either the Jar's Manifest or a resource file (ex. [`loader.json`]).\n    -  This allows for easier versioning and compatibility, notably future API changes.\n- Minimal platform-specific code\n  - Platform-relative code should be kept to a minimum, and should be isolated to the `stage0` bundle; everything else should be platform-agnostic.\n- No extra-downloading\n  - If a file is needed, it should belong in a local shared cache on the computer.\n\n## Stage 0: Wrapper\n\nThe **Wrapper** is the first entrypoint for **OneConfig** and is called depending on the platform as:\n\n- an [`ITweaker`](./stage0/src/launchwrapper/java/org/polyfrost/oneconfig/loader/stage0/LaunchWrapperTweaker.java) for [LaunchWrapper]\n- an [`ITransformationService`](./stage0/src/modlauncher/java/org/polyfrost/oneconfig/loader/stage0/ModLauncherLegacyTransformationService.java) for [ModLauncher]\n  - and [another one](./stage0/src/modlauncher/java9/org/polyfrost/oneconfig/loader/stage0/j9/ModLauncherTransformationService.java) for [ModLauncher] 9+\n- a [`LanguageAdapter`](./stage0/src/fabriclike/java/org/polyfrost/oneconfig/loader/stage0/FabricLikeLanguageAdapter.java) for [Fabric Loader] (and subsequently, [Quilt Loader])\n\nThis direct first entrypoint encapsulates all the required metadata and methods and abstracts them into a platform-agnostic\n[`Capabilities`](./common/src/main/java/org/polyfrost/oneconfig/loader/ILoader.java#L33) interface, and delegates further loading to the \n[`org.polyfrost.oneconfig.loader.stage0.Stage0Loader`](./stage0/src/main/java/org/polyfrost/oneconfig/loader/stage0/Stage0Loader.java) class.\n\n\n\u003e [!IMPORTANT]  \n\u003e This causes the **Wrapper** to also be a \"standalone mod\" for downloading OneConfig, however you should **not** use those artifacts, and should be using [OneConfig Bootstrap] for that purpose.\n\nThe **Wrapper** checks the loaded mod loader version and attempts to load the **Loader** corresponding to that\nversion, by first downloading it, trying cache, and then delegating loading to `org.polyfrost.oneconfig.loader.stage1.Stage1Loader`.\n\n## Stage 1: Loader\n\nThe **Loader** is where the actual loading of OneConfig happens. It is a platform-agnostic jar that tries to download\nthe **OneConfig** jar from the API, its dependencies to a cache, and hands off loading to it, also delegating \n**capabilities** obtained earlier in the chain, such as setting-up Transformers or mixing-in ClassLoading. \n\n**Note**: For backwards-compatibility reasons, the **Loader** also contains the two legacy classes:\n- `cc.polyfrost.oneconfigloader.OneConfigLoader` \n- `cc.polyfrost.oneconfig.loader.OneConfigLoader`\n\nThose classes are located in the [`src/legacy/java`] source-set and are loaded by older versions of the stage 0 **Wrapper**.\n\n\u003e [!CAUTION]  \n\u003e These classes should **never** be used as they are prone to removal at any time.\n\n## API\n\nThe **Polyfrost API** regarding artifacts and metadata is currently a work-in-progress, and will be documented in the future.\n\nIf you wish to see the older version, please check out the [main branch readme](https://github.com/Polyfrost/OneConfigLoader?tab=readme-ov-file#api).\n\n## License\n\nThis project and its files (code, assets, etc.), except where stated otherwise, is licensed under the GNU Lesser General Public License v3.0, see the [LICENSE](./LICENSE) file for more information.\n\n[Polyfrost Documentation]: https://docsv1.polyfrost.org/\n[OneConfig]: https://github.com/Polyfrost/OneConfig\n\n[LaunchWrapper]: https://github.com/Mojang/legacy-launcher\n[ModLauncher]: https://github.com/McModLauncher/modlauncher\n[Fabric Loader]: https://github.com/FabricMC/fabric-loader\n[Quilt Loader]: https://github.com/QuiltMC/quilt-loader\n\n[OneConfig Bootstrap]: https://github.com/Polyfrost/OneConfig-Bootstrap\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyfrost%2Foneconfigloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolyfrost%2Foneconfigloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyfrost%2Foneconfigloader/lists"}