All Projects → FlowArg → FlowUpdater

FlowArg / FlowUpdater

Licence: GPL-3.0 License
The free and open source solution to update Minecraft.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to FlowUpdater

The-Aether
The original "The Aether" mod, rewritten to be ported to Minecraft 1.18 and beyond.
Stars: ✭ 85 (+57.41%)
Mutual labels:  forge, mod, curseforge
3d-Skin-Layers
Renders the player skin layer in 3d
Stars: ✭ 63 (+16.67%)
Mutual labels:  fabric, forge, mod
pax
📦 The MC modpack manager for professionals.
Stars: ✭ 83 (+53.7%)
Mutual labels:  fabric, forge, curseforge
old-animations
Client-side modification for Fabric that allows users to restore animations from older versions.
Stars: ✭ 19 (-64.81%)
Mutual labels:  fabric, mod, curseforge
FallingTree
Minecraft mod to make the trees fall in one cut
Stars: ✭ 47 (-12.96%)
Mutual labels:  fabric, forge, mod
NaturesCompass
A Minecraft mod that allows you to search for a biome's location anywhere in the world and view information about it.
Stars: ✭ 42 (-22.22%)
Mutual labels:  fabric, forge, mod
Tis 3d
TIS-100 inspired low-tech computing in Minecraft.
Stars: ✭ 64 (+18.52%)
Mutual labels:  fabric, forge, mod
Gdlauncher
GDLauncher is a simple, yet powerful Minecraft custom launcher with a strong focus on the user experience
Stars: ✭ 386 (+614.81%)
Mutual labels:  vanilla, forge, mod
FancyMenu
Source code for the FancyMenu mod.
Stars: ✭ 93 (+72.22%)
Mutual labels:  forge, mod, mods
kibe
A miscellaneous mod for Minecraft that adds a bunch of random, and mostly unoriginal things.
Stars: ✭ 42 (-22.22%)
Mutual labels:  fabric, mod, mods
The-Aether-II
The Aether II is the sequel to the highly popular dimension mod "The Aether" for modern versions of Minecraft.
Stars: ✭ 35 (-35.19%)
Mutual labels:  forge, mod, curseforge
multifold
The next-generation cross-platform Minecraft Launcher.
Stars: ✭ 30 (-44.44%)
Mutual labels:  forge, curseforge, mods
Industrial-Revolution
An Industrial mod made for Fabric.
Stars: ✭ 153 (+183.33%)
Mutual labels:  fabric, mod, mods
RandomPatches
A bunch of miscellaneous patches for Minecraft.
Stars: ✭ 89 (+64.81%)
Mutual labels:  fabric, forge
Regeneration
Minecraft Mod that adds the concept of Regeneration from the show Doctor who
Stars: ✭ 22 (-59.26%)
Mutual labels:  forge, mod
Presence-Footsteps
An overly complicated footstep sound enhancement mod for Minecraft
Stars: ✭ 79 (+46.3%)
Mutual labels:  fabric, mod
Modding-Resources
A set of ressources for minecraft modding with MinecraftForge by the community
Stars: ✭ 42 (-22.22%)
Mutual labels:  fabric, forge
advanced-mining-dimension
A dimension consisting just of caves.
Stars: ✭ 15 (-72.22%)
Mutual labels:  forge, mod
Nuclear-Control
An updated version of nuclear control.
Stars: ✭ 25 (-53.7%)
Mutual labels:  forge, mod
relics
No description or website provided.
Stars: ✭ 24 (-55.56%)
Mutual labels:  forge, mod

version discord-shield

FlowUpdater

Check the Wiki to know how to use FlowUpdater and more information.

Usage

Vanilla

First, create a new VanillaVersion, specify arguments. Then build the version :

VanillaVersion version = new VanillaVersionBuilder().withName("1.15.2").withVersionType(VersionType.VANILLA).build();

NOTE : Builders are all static classes except ForgeVersionBuilder.

You have to put the version you want as parameter, you can set a snapshot if you want or latest. If you have specified "latest" to the version name, and that the version is a snapshot, replace false by true.

The most of FlowUpdater objects are buildable: Build a new UpdaterOptions object: I'm not enabling the re-extracting of natives at each update (withReExtractNatives(true)) because FlowUpdater know which natives must be extracted.

UpdaterOptions options = new UpdaterOptionsBuilder().build();

Note that currently UpdaterOptions is useless unless you must enable the legacy withDownloadServer option or a custom ExternalFileDeleter or disabling the silent reading.

Then, instantiate a new FlowUpdater with FlowUpdaterBuilder#withXArguments#withAnotherArguemtn#build. Check the code/JavaDoc for more information.

FlowUpdater updater = new FlowUpdaterBuilder().withVanillaVersion(version).withUpdaterOptions(options).withLogger(someCustomLogger).build();

Don't forget to add a progress callback if you want to make a progress bar!

Finally, call the update function :

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

Forge

(You need to setup a vanilla updater !)

First, in your vanilla version builder, change the version type to VersionType.FORGE. Next, make a List of Mod objects (except if you have no mods to install).

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

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

You can get mods from CurseForge too:

List<CurseFileInfo> 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<CurseFileInfo> mods = CurseFileInfo.getFilesFromJson("https://url.com/launcher/cursemods.json");.

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

AbstractForgeVersion forgeVersion = new ForgeVersionBuilder(ForgeVersionBuilder.ForgeVersionType.NEW)
            .withForgeVersion("31.2.29")
            .withCurseMods(modInfos)
            .withOptifine(new OptifineInfo("1.16.3_HD_U_G3", false)) // installing OptiFine for 1.16.3, false = not a preview
            .withUseFileDeleter(new ModFileDeleter(true, "jei.jar")) // delete bad mods, don't remove the file jei.jar if it's present in the mods' dir.
            .build();

Finally, set the Forge version corresponding to the wanted Forge version :

.withForgeVersion(forgeVersion);

That's all!

MCP

(You need to setup a vanilla updater !) In your vanilla version builder, change the version type to VersionType.MCP. Finally, set to vanilla version builder a MCP version :

.withMCP(new MCP("clientURL", "name", "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 on client-only mcp downloading :

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

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

Fabric

(You need to setup a vanilla updater !)

First, in your vanilla version builder, change the version type to VersionType.FABRIC. Next, make a List of Mod objects like for a ForgeVersion.

Then, build a Fabric version.

FabricVersion fabricVersion = new FabricVersionBuilder()
            .withFabricVersion("0.10.8")
            .withCurseMods(modInfos)
            .withMods(mods)
            .withUseFileDeleter(new ModFileDeleter(true, "sodium.jar")) // delete bad mods ; doesn't remove the file sodium.jar if it's present in the mods' dir.
            .build();

Finally, set the Fabric version corresponding to the wanted Fabric version :

.withFabricVersion(fabricVersion);

That's all!

External Files

With FlowUpdater, you can download other files in your update dir! In your FlowUpdaterBuilder, precise an array list of ExternalFile (can be got by ExternalFile#getExternalFilesFromJson).

About json files...

All json files can be generated by the FlowUpdaterJsonCreator !

Post executions

With FlowUpdater, you can execute some actions after update, like patch a file, kill a process, launch a process, review a config etc... In your FlowUpdaterBuilder, precise a list of Runnable.

And all it's done !

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].