| Constructor and Description |
|---|
FabricMeta(@NotNull java.io.File fabricManifest,
@NotNull java.io.File fabricInstallerManifest,
@NotNull FabricIntermediaries injectedFabricIntermediaries,
@NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper,
@NotNull Utilities utilities)
Create a new Fabric Meta instance, giving you access to available loader and installer
versions, as well as URLs to installer for further processing.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.util.Optional<java.net.URL> |
getInstallerUrl(@NotNull java.lang.String fabricVersion)
Get the URL to the installer for the specified version, wrapped in an Optional.
|
@NotNull java.util.Optional<FabricDetails> |
getLoaderDetails(@NotNull java.lang.String minecraftVersion,
@NotNull java.lang.String fabricVersion)
Get details for a Fabric loader.
|
@NotNull java.util.Optional<java.net.URL> |
improvedLauncherUrl(@NotNull java.lang.String minecraftVersion,
@NotNull java.lang.String fabricVersion)
Get the
URL to the Fabric launcher for the specified Minecraft and Fabric version. |
@NotNull java.lang.String[] |
installerVersionsArrayAscending()
Array of available installer version in ascending order.
|
@NotNull java.lang.String[] |
installerVersionsArrayDescending()
Array of available installer version in descending order.
|
@NotNull java.util.List<java.lang.String> |
installerVersionsListAscending()
List of available installer version in ascending order.
|
@NotNull java.util.List<java.lang.String> |
installerVersionsListDescending()
List of available installer version in descending order.
|
boolean |
isInstallerUrlAvailable(@NotNull java.lang.String fabricVersion)
Check whether a URL to an installer is available for the specified version.
|
boolean |
isMinecraftSupported(@NotNull java.lang.String minecraftVersion)
Check whether the given Minecraft version is supported by this modloader.
|
boolean |
isVersionValid(@NotNull java.lang.String fabricVersion)
Check whether the specified version is available/correct/valid.
|
@NotNull java.lang.String |
latestInstaller()
Get the latest installer version.
|
@NotNull java.net.URL |
latestInstallerUrl()
Get the URL to the latest installer.
|
@NotNull java.lang.String |
latestLoader()
Get the latest loader version.
|
@NotNull java.lang.String[] |
loaderVersionsArrayAscending()
Array of available loader versions in ascending order.
|
@NotNull java.lang.String[] |
loaderVersionsArrayDescending()
Array of available loader versions in descending order.
|
@NotNull java.util.List<java.lang.String> |
loaderVersionsListAscending()
List of available loader versions in ascending order.
|
@NotNull java.util.List<java.lang.String> |
loaderVersionsListDescending()
List of available loader versions in descending order.
|
@NotNull java.lang.String |
releaseInstaller()
Get the release installer version.
|
@NotNull java.net.URL |
releaseInstallerUrl()
Get the URL to the release installer.
|
@NotNull java.lang.String |
releaseLoader()
Get the release loader version.
|
void |
update()
Update the meta-information for this modloader-meta, updating the available loader and
installer versions, thus giving you access to version-checks, URLs etc.
|
public FabricMeta(@NotNull
@NotNull java.io.File fabricManifest,
@NotNull
@NotNull java.io.File fabricInstallerManifest,
@NotNull
@NotNull FabricIntermediaries injectedFabricIntermediaries,
@NotNull
@NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper,
@NotNull
@NotNull Utilities utilities)
fabricManifest - Fabric manifest file.fabricInstallerManifest - Fabric-installer manifest file.injectedFabricIntermediaries - Fabric Intermediary instance.objectMapper - Object mapper for JSON parsing.utilities - Commonly used utilities across ServerPackCreator.public void update()
throws javax.xml.parsers.ParserConfigurationException,
java.io.IOException,
org.xml.sax.SAXException
Meta@Contract(pure=true) @NotNull public @NotNull java.lang.String latestLoader()
MetalatestLoader in interface Meta@Contract(pure=true) @NotNull public @NotNull java.lang.String releaseLoader()
MetareleaseLoader in interface Meta@Contract(pure=true) @NotNull public @NotNull java.lang.String latestInstaller()
MetalatestInstaller in interface Meta@Contract(pure=true) @NotNull public @NotNull java.lang.String releaseInstaller()
MetareleaseInstaller in interface Meta@Contract(pure=true) @NotNull public @NotNull java.util.List<java.lang.String> loaderVersionsListAscending()
MetaloaderVersionsListAscending in interface Meta@NotNull public @NotNull java.util.List<java.lang.String> loaderVersionsListDescending()
MetaloaderVersionsListDescending in interface Meta@NotNull public @NotNull java.lang.String[] loaderVersionsArrayAscending()
MetaloaderVersionsArrayAscending in interface Meta@NotNull public @NotNull java.lang.String[] loaderVersionsArrayDescending()
MetaloaderVersionsArrayDescending in interface Meta@Contract(pure=true) @NotNull public @NotNull java.util.List<java.lang.String> installerVersionsListAscending()
MetainstallerVersionsListAscending in interface Meta@NotNull public @NotNull java.util.List<java.lang.String> installerVersionsListDescending()
MetainstallerVersionsListDescending in interface Meta@NotNull public @NotNull java.lang.String[] installerVersionsArrayAscending()
MetainstallerVersionsArrayAscending in interface Meta@NotNull public @NotNull java.lang.String[] installerVersionsArrayDescending()
MetainstallerVersionsArrayDescending in interface Meta@Contract(pure=true) @NotNull public @NotNull java.net.URL latestInstallerUrl()
MetalatestInstallerUrl in interface Meta@Contract(pure=true) @NotNull public @NotNull java.net.URL releaseInstallerUrl()
MetareleaseInstallerUrl in interface Metapublic boolean isInstallerUrlAvailable(@NotNull
@NotNull java.lang.String fabricVersion)
MetaisInstallerUrlAvailable in interface MetafabricVersion - The modloader version for which to check for installer availability.true if available.@NotNull
public @NotNull java.util.Optional<java.net.URL> getInstallerUrl(@NotNull
@NotNull java.lang.String fabricVersion)
MetagetInstallerUrl in interface MetafabricVersion - The modloader version for which to get the installer.public boolean isVersionValid(@NotNull
@NotNull java.lang.String fabricVersion)
MetaisVersionValid in interface MetafabricVersion - The version to check.true if the specified version is available/correct/valid.public boolean isMinecraftSupported(@NotNull
@NotNull java.lang.String minecraftVersion)
MetaisMinecraftSupported in interface MetaminecraftVersion - The Minecraft version for which to check for support.true if the specified Minecraft version is supported.@NotNull
public @NotNull java.util.Optional<java.net.URL> improvedLauncherUrl(@NotNull
@NotNull java.lang.String minecraftVersion,
@NotNull
@NotNull java.lang.String fabricVersion)
URL to the Fabric launcher for the specified Minecraft and Fabric version.minecraftVersion - Minecraft version.fabricVersion - Fabric version.@NotNull public @NotNull java.util.Optional<FabricDetails> getLoaderDetails(@NotNull @NotNull java.lang.String minecraftVersion, @NotNull @NotNull java.lang.String fabricVersion)
minecraftVersion - Minecraft version.fabricVersion - Fabric version.Optional.