Package fr.flowarg.flowupdater.versions
Class VanillaVersion.VanillaVersionBuilder
java.lang.Object
fr.flowarg.flowupdater.versions.VanillaVersion.VanillaVersionBuilder
- All Implemented Interfaces:
IBuilder<VanillaVersion>
- Enclosing class:
- VanillaVersion
public static class VanillaVersion.VanillaVersionBuilder
extends Object
implements IBuilder<VanillaVersion>
A builder for building a vanilla version like
FlowUpdater.FlowUpdaterBuilder-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a newVanillaVersioninstance with provided arguments.withAnotherAssets(AssetDownloadable... anotherAssets) Add custom assets to the version.withAnotherAssets(Collection<AssetDownloadable> anotherAssets) Add custom assets to the version.withAnotherLibraries(Downloadable... anotherLibraries) Add custom libraries to the version.withAnotherLibraries(Collection<Downloadable> anotherLibraries) Add custom libraries to the version.withCustomAssetIndex(AssetIndex assetIndex) Add custom asset index to the version.withCustomVersionJson(com.google.gson.JsonObject customVersionJson) Define the version's json.withCustomVersionJson(URL customVersionJsonUrl) Define the version's json.Append a mcp object to the versionAppend a mcp object to the versionAppend a mcp object to the versionDefine the name of the wanted Minecraft version.withSnapshot(boolean snapshot) Required if you want the latest snapshot version.
-
Constructor Details
-
VanillaVersionBuilder
public VanillaVersionBuilder()
-
-
Method Details
-
withName
Define the name of the wanted Minecraft version.- Parameters:
name- wanted Minecraft's version.- Returns:
- the builder.
-
withMCP
Append a mcp object to the version- Parameters:
mcp- the mcp object to append.- Returns:
- the builder.
-
withMCP
Append a mcp object to the version- Parameters:
mcpJsonUrl- the mcp json url of mcp object to append.- Returns:
- the builder.
-
withMCP
Append a mcp object to the version- Parameters:
mcpJsonUrl- the mcp json url of mcp object to append.- Returns:
- the builder.
-
withSnapshot
Required if you want the latest snapshot version. Otherwise, it's unnecessary.- Parameters:
snapshot- if the version is a snapshot.- Returns:
- the builder.
-
withCustomAssetIndex
Add custom asset index to the version.- Parameters:
assetIndex- the custom asset index to add.- Returns:
- the builder.
-
withAnotherAssets
public VanillaVersion.VanillaVersionBuilder withAnotherAssets(Collection<AssetDownloadable> anotherAssets) Add custom assets to the version.- Parameters:
anotherAssets- custom assets to add.- Returns:
- the builder.
-
withAnotherAssets
Add custom assets to the version.- Parameters:
anotherAssets- custom assets to add.- Returns:
- the builder.
-
withAnotherLibraries
public VanillaVersion.VanillaVersionBuilder withAnotherLibraries(Collection<Downloadable> anotherLibraries) Add custom libraries to the version.- Parameters:
anotherLibraries- custom libraries to add.- Returns:
- the builder.
-
withAnotherLibraries
Add custom libraries to the version.- Parameters:
anotherLibraries- custom libraries to add.- Returns:
- the builder.
-
withCustomVersionJson
public VanillaVersion.VanillaVersionBuilder withCustomVersionJson(com.google.gson.JsonObject customVersionJson) Define the version's json.- Parameters:
customVersionJson- the custom version's json to set.- Returns:
- the builder.
-
withCustomVersionJson
Define the version's json.- Parameters:
customVersionJsonUrl- the custom version's json url to set.- Returns:
- the builder.
-
build
Build a newVanillaVersioninstance with provided arguments.- Specified by:
buildin interfaceIBuilder<VanillaVersion>- Returns:
- the freshly created instance.
- Throws:
BuilderException- if an error occurred.
-