public final class VersionUtil
extends java.lang.Object
ModInfo
to int
s.Modifier and Type | Method and Description |
---|---|
static int |
getMajor(ModInfo modInfo) |
static int |
getMinor(ModInfo modInfo) |
static int |
getPatch(ModInfo modInfo) |
static int[] |
getVersionArray(ModInfo modInfo)
Parses the
ModInfo.version() parameter and returns it as an integer array in which index 0 corresponds to MAJOR , index 1 to
MINOR and 2 to PATCH of the semantic versioning system. |
public static int[] getVersionArray(ModInfo modInfo)
ModInfo.version()
parameter and returns it as an integer array in which index 0 corresponds to MAJOR
, index 1 to
MINOR
and 2 to PATCH
of the semantic versioning system.modInfo
- ModInfo
to parseModInfo
parsed to integer array.public static int getMajor(ModInfo modInfo)
modInfo
- ModInfo
to parseMAJOR
parameter of the semantic versioning system.public static int getMinor(ModInfo modInfo)
modInfo
- ModInfo
to parseMINOR
of the semantic versioning system.public static int getPatch(ModInfo modInfo)
modInfo
- ModInfo
to parsePATCH
of the semantic versioning system.