-
Notifications
You must be signed in to change notification settings - Fork 18
Vanilla
In this tutorial, you will learn how to set up and use a vanilla version on FlowUpdater
.
You need to setup a Fabric, Forge or MCP version? So you need to build a VanillaVersion
.
VanillaVersion
is a buildable class only. Its builder is a static-class in VanillaVersion
.
Refer you to the JavaDoc to see the utility of each parameter.
Build an VanillaVersion
object as a classic builder. Then, just add an instance of your freshly built VanillaVersion
object as a FlowUpdater's argument:
import fr.flowarg.flowupdater.FlowUpdater;
import fr.flowarg.flowupdater.versions.VanillaVersion;
import fr.flowarg.flowupdater.versions.VersionType;
import java.nio.file.Paths;
public class Main
{
public static void update() throws Exception
{
VanillaVersion vanillaVersion = new VanillaVersion.VanillaVersionBuilder()
.withName("1.19.2")
.build();
FlowUpdater flowUpdater = new FlowUpdater.FlowUpdaterBuilder()
.withVanillaVersion(vanillaVersion)
.build();
flowUpdater.update(Paths.get("test")); // Paths.get can be replaced with Path.of starting of Java 11
}
}
In this case, FlowUpdater
will download/update Minecraft 1.19.2 vanilla version.
Note: If you replace "1.19.2"
by "latest"
, FlowUpdater
will download the latest release of the game. If you add .withSnapshot(true)
in the VanillaVersionBuilder
instance with "latest"
as the version, FlowUpdater
will download the latest snapshot of the game.