{"id":15059762,"url":"https://github.com/flowarg/flowupdater","last_synced_at":"2025-04-05T11:09:26.747Z","repository":{"id":41421256,"uuid":"251111238","full_name":"FlowArg/FlowUpdater","owner":"FlowArg","description":"The free and open source solution to update Minecraft.","archived":false,"fork":false,"pushed_at":"2024-10-13T18:39:00.000Z","size":7544,"stargazers_count":98,"open_issues_count":0,"forks_count":18,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T11:09:16.071Z","etag":null,"topics":["builder","curse-mods","curseforge","fabric","forge","java","json","mcp","minecraft","minecraft-modpack-updater","mod","modrinth","mods","quilt","updater","vanilla"],"latest_commit_sha":null,"homepage":"https://flowarg.github.io/FlowUpdater","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FlowArg.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}},"created_at":"2020-03-29T19:06:27.000Z","updated_at":"2025-03-13T15:41:57.000Z","dependencies_parsed_at":"2024-01-14T02:37:50.525Z","dependency_job_id":"0795b474-4c0d-440d-8470-0211d549147c","html_url":"https://github.com/FlowArg/FlowUpdater","commit_stats":null,"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlowArg%2FFlowUpdater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlowArg%2FFlowUpdater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlowArg%2FFlowUpdater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlowArg%2FFlowUpdater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FlowArg","download_url":"https://codeload.github.com/FlowArg/FlowUpdater/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"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":["builder","curse-mods","curseforge","fabric","forge","java","json","mcp","minecraft","minecraft-modpack-updater","mod","modrinth","mods","quilt","updater","vanilla"],"created_at":"2024-09-24T22:47:30.410Z","updated_at":"2025-04-05T11:09:26.706Z","avatar_url":"https://github.com/FlowArg.png","language":"Java","readme":"[version]: https://img.shields.io/maven-central/v/fr.flowarg/flowupdater.svg?label=Download\r\n[download]: https://search.maven.org/search?q=g:%22fr.flowarg%22%20AND%20a:%22flowupdater%22\r\n\r\n[discord-shield]: https://discordapp.com/api/guilds/730758985376071750/widget.png\r\n[discord-invite]: https://discord.gg/dN6HWHp\r\n\r\n[ ![version][] ][download]\r\n[ ![discord-shield][] ][discord-invite]\r\n\r\n# FlowUpdater\r\nWelcome on FlowUpdater's repository. FlowUpdater is a free and open source solution to update Minecraft in Java.\r\nIt was mainly designed for launcher's purposes but can be used for other usages as well. FlowUpdater focuses on customization and reliability.\r\nThe best documentation is the JavaDoc included in FlowUpdater's source code. The rest of the documentation (for instance this readme or the wiki tab on GitHub) has a chance of not being updated.\r\n\r\n## Legal and fork notices :warning:\r\nThe CurseForge integration works with an API Key which is mine at the moment. **You CAN'T use this key for other purposes outside FlowUpdater.**\r\nIf you wish to fork this project, **you HAVE TO use your own API Key**.\r\n\r\n## Alternatives\r\nIf you are a developer or know a developer that has made a similar library in another programming language,\r\nfeel free to ask to appear in this list:\r\n- [Rust Launcher Lib](https://github.com/knightmar/rust_launcher_lib) (Rust)\r\n\r\n## Usage\r\n\r\n### Vanilla\r\n\r\nFirst, create a new VanillaVersion, and build the version:\r\n```java\r\nVanillaVersion version = new VanillaVersion.VanillaVersionBuilder().withName(\"1.20.4\").build();\r\n```\r\n`VanillaVersion` accepts some arguments to add more libraries, assets or to reach snapshots or custom version of the game.\r\nAll accepted arguments are available in the `VanillaVersionBuilder` class.\r\n\r\nAdd the version to a new `FlowUpdater` instance and build it:\r\n```java\r\nFlowUpdater updater = new FlowUpdater.FlowUpdaterBuilder()\r\n        .withVanillaVersion(version)\r\n        .build();\r\n```\r\n\r\nIn the same way, `FlowUpdater` accepts many arguments that you can use as you want.\r\nThe more important ones to know about are: the logger, the progress callback, the vanilla version, possibly a mod loader version. The full list is available in the `FlowUpdaterBuilder` class.\r\n\r\n\r\nFinally, call the update function:\r\n```java\r\nupdater.update(Paths.get(\"your/path/\"));\r\n```\r\nThis `update` method will start the whole checks-and-download pipeline and will return when all the work is done.\r\nYou usually need to put this method in a new `Thread` / `ExecutorService` because apart from the assets part, all actions are run on the same thread.\r\n\r\n\r\n### Forge\r\n\r\n(You need to setup a vanilla version like above!)\r\n\r\nNext, make a List of Mod objects (except if you don't need some).\r\n```java\r\nList\u003cMod\u003e mods = new ArrayList\u003c\u003e();\r\nmods.add(new Mod(\"OneMod.jar\", \"sha1ofmod\", 85120, \"https://link.com/of/mod.jar\"));\r\nmods.add(new Mod(\"AnotherMod.jar\", \"sha1ofanothermod\", 86120, \"https://link.com/of/another/mod.jar\"));\r\n```\r\nYou can also get a list of mods by providing a json link: `List\u003cMod\u003e mods = Mod.getModsFromJson(\"https://url.com/launcher/mods.json\");`. A template is available in Mod class.\r\n\r\nYou can get mods from CurseForge too:\r\n```java\r\nList\u003cCurseFileInfo\u003e modInfos = new ArrayList\u003c\u003e();\r\n// project ID and file ID\r\nmodInfos.add(new CurseFileInfo(238222, 2988823));\r\n```\r\nYou can also get a list of curse mods by providing a json link: `List\u003cCurseFileInfo\u003e mods = CurseFileInfo.getFilesFromJson(\"https://url.com/launcher/cursemods.json\");`.\r\n\r\nOn the same pattern, you can get mods from Modrinth.\r\n\r\nThen, build a forge version. For example, I will build a NewForgeVersion.\r\n```java\r\nForgeVersion forgeVersion = new ForgeVersionBuilder()\r\n            .withForgeVersion(\"1.20.6-50.1.12\") // mandatory\r\n            .withCurseMods(modInfos) // optional\r\n            .withOptiFine(new OptiFineInfo(\"preview_OptiFine_1.20.6_HD_U_I9_pre1\")) // installing OptiFine (optional)\r\n            .withFileDeleter(new ModFileDeleter(\"jei.jar\")) // (optional, but recommended) delete bad mods, don't remove the file jei.jar if it's present in mods directory. You can also provide A `Pattern` with a regex rule.\r\n            .build();\r\n```\r\n\r\nFinally, set the Forge version object to your `FlowUpdaterBuilder`:\r\n```java\r\n.withModLoaderVersion(forgeVersion);\r\n```\r\n\r\n### MCP\r\n\r\n(You need to setup a vanilla updater!)\r\n\r\nThere are two ways to setup an MCP version. You can either (1) provide an MCP object (for a simple client for example) or (2) a JSON link to a custom json version which can contains custom assets, custom libraries etc...\r\n\r\n(1) set to vanilla version builder a MCP version:\r\n```java\r\n.withMCP(new MCP(\"clientURL\", \"clientSha1\", 25008229));\r\n```\r\nIf you set an empty/null string in url and sha1 and 0 in size, the updater will use the default minecraft jar.\r\nExample for a client-only mcp downloading:\r\n```java\r\n.withMCP(new MCP(\"https://mighya.eu/resources/Client.jar\", \"f2c219e485831af2bae9464eebbe4765128c6ad6\", 23005862));\r\n```\r\nYou can get an MCP object instance by providing a json link too: `.withMCP(\"https://url.com/launcher/mcp.json\");`.\r\n\r\n(2)\r\nStill in the vanilla version builder, set a json link to a custom MCP version:\r\n```java\r\n.withCustomVersionJson(new URL(\"https://url.com/launcher/mcp.json\"));\r\n```\r\n\r\nYou can also provide some more additional libraries or assets with all methods in the `VanillaVersionBuilder` class\r\n(`withAnotherLibraries`, `withAnotherAssets`, `withCustomAssetIndex`).\r\n\r\n### Fabric\r\n\r\n(You need to setup a vanilla updater!)\r\n\r\nNext, make a List of Mod objects like for a ForgeVersion if you need some.\r\n\r\nThen, build a Fabric version.\r\n```java\r\nFabricVersion fabricVersion = new FabricVersionBuilder()\r\n            .withFabricVersion(\"0.10.8\") // optional, if you don't set one, it will take the latest fabric loader version available.\r\n            .withCurseMods(modInfos) // optional\r\n            .withMods(mods) // optional\r\n            .withFileDeleter(new ModFileDeleter(\"sodium.jar\")) // (optional but recommended) delete bad mods ; but it won't remove the file sodium.jar if it's present in the mods' dir.\r\n            .build();\r\n```\r\n\r\nFinally, set the Fabric version to your `FlowUpdaterBuilder`:\r\n```java\r\n.withModLoaderVersion(fabricVersion);\r\n```\r\n\r\n## External Files\r\n\r\nWith FlowUpdater, you can download other files in your update dir! This system is designed mainly for configs, resource packs.\r\nYou can also configure a keep-policy for these files (should the updater download the file again if it is modified?).\r\nIn your FlowUpdaterBuilder, define an array list of ExternalFile (by `ExternalFile#getExternalFilesFromJson` for more convenience).\r\n\r\n### About json files...\r\n\r\n**Deprecated**: All json files can be generated by the [FlowUpdaterJsonCreator](https://github.com/FlowArg/FlowUpdaterJsonCreator)!\r\n\r\nThere are new tools made by the community that can help you generate some JSON files:\r\n- [FlowJsonCreator by Paulem79](https://github.com/Paulem79/FlowJsonCreator) (Java)\r\n- [FUJC-API by Zuygui](https://github.com/zuygui/flowupdater-json-creator) (Rust)\r\n\r\n## Post executions\r\n\r\nWith FlowUpdater, you can execute some actions after update, like patch a file, kill a process, launch a process, review a config etc...\r\nIn your FlowUpdaterBuilder, you have to set a list of Runnable.\r\nIt's not always relevant to use this feature, but it can be useful in some specific cases.\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowarg%2Fflowupdater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowarg%2Fflowupdater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowarg%2Fflowupdater/lists"}