Class VersionMeta

  • All Implemented Interfaces:

    
    public final class VersionMeta
    
                        

    VersionMeta containing available versions and important details for Minecraft, Fabric and Forge.

    Author:

    Griefed

    • Constructor Detail

      • VersionMeta

        VersionMeta(File minecraftManifest, File forgeManifest, File oldNeoForgeManifest, File newNeoForgeManifest, File fabricManifest, File fabricInstallerManifest, File fabricIntermediariesManifest, File quiltManifest, File quiltInstallerManifest, File legacyFabricGameManifest, File legacyFabricLoaderManifest, File legacyFabricInstallerManifest, ObjectMapper objectMapper, Utilities utilities, ApiProperties apiProperties)
        Parameters:
        minecraftManifest - Minecraft manifest file.
        forgeManifest - Forge manifest file.
        fabricManifest - Fabric manifest file.
        fabricInstallerManifest - Fabric-installer manifest file.
        fabricIntermediariesManifest - Fabric Intermediary manifest-file.
        quiltManifest - Quilt manifest file.
        quiltInstallerManifest - Quilt-installer manifest file.
        legacyFabricGameManifest - Fabric Legacy Game manifest file.
        legacyFabricLoaderManifest - Fabric Legacy Loader manifest file.
        legacyFabricInstallerManifest - Fabric Legacy Installer manifest file.
        objectMapper - Object mapper-instance for JSON parsing.
        utilities - Commonly used utilities across ServerPackCreator.
        apiProperties - ServerPackCreator settings.
    • Method Detail

      • getLegacyFabricUrlGame

         final URL getLegacyFabricUrlGame()

        Upstream list of Minecraft versions LegacyFabric supports. Separate from the loader list below: LegacyFabric publishes the two independently, and a version needs an entry in both to be usable.

      • getLegacyfabricUrlManifest

         final URL getLegacyfabricUrlManifest()

        Upstream LegacyFabric installer versions — a different series from the loader versions, and not interchangeable.

      • getMinecraftUrlManifest

         final URL getMinecraftUrlManifest()

        Mojang's version manifest: the authority for which Minecraft versions exist, their type, and where each version's own JSON lives (which is what declares the required Java).

      • getOldNeoForgeUrlManifest

         final URL getOldNeoForgeUrlManifest()

        NeoForge's legacy maven metadata, covering its first releases under the net/neoforged/forge artifact — Minecraft 1.20 and 1.20.1 only. Kept because those versions exist nowhere else.

      • getNewNeoForgeUrlManifest

         final URL getNewNeoForgeUrlManifest()

        NeoForge's current maven metadata, covering everything after the 1.20.1 era.

      • getFabricUrlManifest

         final URL getFabricUrlManifest()

        Upstream Fabric loader versions. Minecraft-independent: one loader line serves every supported version.

      • getFabricUrlIntermediariesManifest

         final URL getFabricUrlIntermediariesManifest()

        Fabric's intermediary mappings, which is what actually says whether Fabric supports a given Minecraft version — the loader list alone cannot answer that.

      • getQuiltUrlManifest

         final URL getQuiltUrlManifest()

        Upstream Quilt loader versions. Minecraft-independent, like Fabric's.

      • getQuiltUrlInstallerManifest

         final URL getQuiltUrlInstallerManifest()

        Upstream Quilt installer versions. The installer needs Java 17+ even when the server it installs runs on 8.

      • getMinecraft

         final MinecraftMeta getMinecraft()

        The MinecraftMeta instance for working with Minecraft versions and information about them.

      • getFabric

         final FabricMeta getFabric()

        The QuiltMeta-instance for working with Fabric versions and information about them.

      • getForge

         final ForgeMeta getForge()

        The ForgeMeta-instance for working with Forge versions and information about them.

      • getNeoForge

         final NeoForgeMeta getNeoForge()

        The NeoForgeMeta-instance for working with NeoForge versions and information about them.

      • getQuilt

         final QuiltMeta getQuilt()

        The QuiltMeta-instance for working with Quilt versions and information about them.

      • getFabricIntermediaries

         final FabricIntermediaries getFabricIntermediaries()

        Fabric's intermediary mappings. Consulted to answer whether Fabric (or Quilt, which runs Fabric mods) supports a given Minecraft version — the loader versions alone cannot, since one loader line serves them all.

      • awaitManifestRefresh

         final Boolean awaitManifestRefresh(Long timeoutMillis)

        Waits up to timeoutMillis for the background manifest refresh to finish, returning whether it did.

        For callers that must not show stale versions — the GUI's version dropdowns are built once and never repopulated, so a freshly released Minecraft version would otherwise be missing until the next launch. Cheap in practice: by the time a user can click anything the refresh has long finished, and this returns immediately. Bounded so an unreachable host delays a dropdown instead of hanging the UI.

      • update

        @Synchronized() final VersionMeta update()

        Update the Minecraft, Forge and Fabric metas. Usually called when the manifest files have been refreshed.

        Returns:

        The instance of this version meta, updated.