Interface ImmersiveMCMeta
- All Known Implementing Classes:
ImmersiveMCMetaImpl
public interface ImmersiveMCMeta
Contains methods relating to ImmersiveMC itself, rather than an individual API feature of ImmersiveMC.
Note that the versioning methods here refer to the version of ImmersiveMC's API, rather than of the user-facing version number, see
Note that the versioning methods here refer to the version of ImmersiveMC's API, rather than of the user-facing version number, see
compatibleWithAPIVersion(String)
for more info. ImmersiveMC's API version follows
"partial semantic versioning", where the version number is of the format "x.y", x being equivalent to MAJOR from
semantic versioning while y is to MINOR from semantic versioning. For example, ImmersiveMC 1.5.0 has the version
"2.0".-
Method Summary
Modifier and TypeMethodDescriptionboolean
compatibleWithAPIVersion
(String builtVersion) Given an internal API version, determines if that API version is compatible with the currently-active version of ImmersiveMC.Gets ImmersiveMC's internal API version as a string.int
int
static ImmersiveMCMeta
instance()
-
Method Details
-
instance
- Returns:
- An ImmersiveMCMeta instance to access API functions. All details of this object not mentioned in this file are assumed to be an implementation detail, and may change at any time.
-
compatibleWithAPIVersion
Given an internal API version, determines if that API version is compatible with the currently-active version of ImmersiveMC. Note that this is only for guaranteed compatibility, you may interact with ImmersiveMC in such a way where several different, major ImmersiveMC versions are still compatible with your code. This should be checked for manually by comparing againstgetMajorAPIVersion()
andgetMinorAPIVersion()
.- Parameters:
builtVersion
- The internal API version to check with. This usually should be ImmersiveMC's internal API version that your code was built with.- Returns:
- Whether your code is compatible under "partial semantic versioning" with this version of ImmersiveMC.
- Throws:
IllegalArgumentException
- If an invalid version string is provided, such as one that doesn't follow semantic versioning.
-
getAPIVersion
String getAPIVersion()Gets ImmersiveMC's internal API version as a string. If you want the user-facing ImmersiveMC version, you should use the appropriate method from your modloader of choice.- Returns:
- ImmersiveMC's internal API version following "partial semantic versioning".
-
getMajorAPIVersion
int getMajorAPIVersion()- Returns:
- The major version number of ImmersiveMC's internal API. See
getAPIVersion()
for more info.
-
getMinorAPIVersion
int getMinorAPIVersion()- Returns:
- The minor version number of ImmersiveMC's internal API. See
getAPIVersion()
for more info.
-