Class McVersionLookup

java.lang.Object
dev.lambdaurora.mcdev.api.McVersionLookup

public final class McVersionLookup extends Object
  • Method Details

    • isRelease

      public static boolean isRelease(@NotNull @NotNull String version)
      Returns true if the given Minecraft version is a release, or false otherwise.
      Parameters:
      version - the Minecraft version
      Returns:
      true if the given Minecraft version is a release, or false otherwise
    • isAlmostRelease

      public static boolean isAlmostRelease(@NotNull @NotNull String version)
      Returns true if the given Minecraft version is a release or a release candidate, or false otherwise.
      Parameters:
      version - the Minecraft version
      Returns:
      true if the given Minecraft version is a release or a release candidate, or false otherwise
    • getRelease

      @NotNull public static @NotNull String getRelease(@NotNull @NotNull String version)
      Gets the release cycle associated with the given Minecraft version.
      Parameters:
      version - the Minecraft version
      Returns:
      the release cycle associated
    • getVersionTag

      @NotNull public static @NotNull String getVersionTag(String version)
      Returns the Minecraft version a mod user will be likely to focus on.

      Mods having a tendency to update during release candidates of Minecraft releases, such updates will most likely end up used for the actual release. This method aims to get the most likely Minecraft release target.

      This means that for 1.21.5-rc1 the version tag will be 1.21.5.

      Parameters:
      version - the Minecraft version
      Returns:
      the Minecraft version a mod user will be likely to focus on
    • normalizeVersion

      @NotNull public static @NotNull String normalizeVersion(@NotNull @NotNull String version)
    • getCurseForgeEquivalent

      @NotNull public static @NotNull String getCurseForgeEquivalent(@NotNull @NotNull String version)
      Returns the CurseForge equivalent of a given Minecraft version.

      This means for release it will return the same version. But for snapshots, pre-releases, or release candidates it will return the version cycle appended with "-Snapshot".

      Parameters:
      version - the Minecraft version
      Returns:
      the CurseForge equivalent of a given Minecraft version