百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

FlowUpdater

> 编程语言
开源

免费的和 开源 解决方案,用于更新 Minecraft。

100 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

免费的和 开源 解决方案,用于更新 Minecraft。

version discord-shield

FlowUpdater

Welcome on FlowUpdater's repository. FlowUpdater is a free and open source solution to update Minecraft in Java. It is mainly designed for launcher's purposes but can be used for other usages as well. FlowUpdater focuses on customization and reliability. The 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) may not be up to date.

Legal and fork notices :warning:

The CurseForge integration works with an API Key which is mine at the moment. You CAN'T use this key for other purposes outside FlowUpdater. If you wish to fork this project, you HAVE TO use your own API Key.

Alternatives

If you are a developer or know a developer who has made a similar library in another programming language, feel free to ask to appear in this list:

  • LightyLauncherLib (Rust, recommended)
  • Rust Launcher Lib (Rust)

Usage

Vanilla (needed even if you want to use a mod loader)

First, create a new VanillaVersion, and build the version:

java
VanillaVersion version = new VanillaVersion.VanillaVersionBuilder().withName("1.20.4").build();

VanillaVersion accepts some arguments to add more libraries, assets or to reach snapshots or custom versions of the game. All accepted arguments are available in the VanillaVersionBuilder subclass.

Add the version to a new FlowUpdater instance and build it:

java
FlowUpdater updater = new FlowUpdater.FlowUpdaterBuilder()
        .withVanillaVersion(version)
        .build();

Similarly, FlowUpdater accepts many other arguments that you can use as needed. The most important ones are: the logger, the progress callback (for a progreses bar for instance) and the mod loader version. The full list is available in the FlowUpdaterBuilder subclass.

Finally, call the update function:

java
updater.update(Paths.get("your/path/"));

This update method will start the whole check-and-download pipeline and will return when all the work is done. You usually need to put this method in a new Thread / ExecutorService because apart from some specific download cases, all actions are run on the same thread.

Forge

(You need to setup a vanilla version like above!)

Next, make a List of Mod objects (except if you don't need some).

java
List mods = new ArrayList<>();
mods.add(new Mod("OneMod.jar", "sha1ofmod", 85120, "https://link.com/of/mod.jar"));
mods.add(new Mod("AnotherMod.jar", "sha1ofanothermod", 86120, "https://link.com/of/another/mod.jar"));

You can also get a list of mods by providing a json link: List mods = Mod.getModsFromJson("https://url.com/launcher/mods.json");. A template is available in Mod class.

You can get mods from CurseForge too:

java
List modInfos = new ArrayList<>();
// project ID and file ID
modInfos.add(new CurseFileInfo(238222, 2988823));

You can also get a list of curse mods by providing a json link: List mods = CurseFileInfo.getFilesFromJson("https://url.com/launcher/cursemods.json");.

On the same pattern, you can get mods from Modrinth.

Then, build a forge version. For example, I will build a NewForgeVersion.

java
ForgeVersion forgeVersion = new ForgeVersionBuilder()
            .withForgeVersion("1.20.6-50.1.12") // mandatory
            .withCurseMods(modInfos) // optional
            .withOptiFine(new OptiFineInfo("preview_OptiFine_1.20.6_HD_U_I9_pre1")) // installing OptiFine (optional)
            .withFileDeleter(new ModFileDeleter(true, "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.
            .build();

Finally, set the Forge version object to your FlowUpdaterBuilder:

java
.withModLoaderVersion(forgeVersion);

NeoForge

Works almost the same way as Forge, but you need to use NeoForgeVersion instead of ForgeVersion and NeoForgeVersionBuilder instead of ForgeVersionBuilder. Be careful when passing the neoforge version, it must be in the forge format for 1.20.1 (1.20.1-47.1.5 for example) ; but you should only pass the neoforge version for versions >= 1.21 (21.8.31 for example).

Fabric

(You need to setup a vanilla updater!)

Next, make a List of Mod objects like for a ForgeVersion if you need some.

Then, build a Fabric version:

java
FabricVersion fabricVersion = new FabricVersionBuilder()
            .withFabricVersion("0.10.8") // optional, if you don't set one, it will take the latest fabric loader version available.
            .withCurseMods(modInfos) // optional
            .withMods(mods) // optional
            .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.
            .build();

Finally, set the Fabric version to your FlowUpdaterBuilder:

java
.withModLoaderVersion(fabricVersion);

MCP (not very recommended, but it can be useful for some specific cases)

(You need to setup a vanilla updater!)

There 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...

(1) set to vanilla version builder a MCP version:

java
.withMCP(new MCP("clientURL", "clientSha1", 25008229));

If you set an empty/null string in url and sha1 and 0 in size, the updater will use the default minecraft jar. Example for a client-only mcp downloading:

java
.withMCP(new MCP("https://mighya.eu/resources/Client.jar", "f2c219e485831af2bae9464eebbe4765128c6ad6", 23005862));

You can get an MCP object instance by providing a json link too: .withMCP("https://url.com/launcher/mcp.json");.

(2) Still in the vanilla version builder, set a json link to a custom MCP version:

java
.withCustomVersionJson(new URL("https://url.com/launcher/mcp.json"));

You can also provide some more additional libraries or assets with all methods in the VanillaVersionBuilder subclass (withAnotherLibraries, withAnotherAssets, withCustomAssetIndex).

External Files

With FlowUpdater, you can download other files in your update dir! This system is mainly designed for configs, resource packs. You can also configure a keep-policy for these files (should the updater download the file again if it is modified?). In your FlowUpdaterBuilder, define an array list of ExternalFile (with ExternalFile#getExternalFilesFromJson for more convenience).

About json files...

Deprecated: All json files can be generated by the FlowUpdaterJsonCreator!

There are new tools made by the community that can help you generate some JSON files:

  • FlowJsonCreator by Paulem79 (Java)
  • FUJC by Zuygui (Rust)

Post executions

With FlowUpdater, you can execute some actions after the update, like patch a file, kill a process, launch a process, review a config etc... In your FlowUpdaterBuilder, you have to set a list of Runnable. It's not always relevant to use this feature, but it can be useful in some specific cases where you want to stay on the update thread.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javabuildercurse-modscurseforgefabric

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言