Class ImmersiveMCMetaImpl
java.lang.Object
com.hammy275.immersivemc.common.api_impl.ImmersiveMCMetaImpl
- All Implemented Interfaces:
ImmersiveMCMeta
-
Field Summary
Fields -
Constructor Summary
Constructors -
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
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ImmersiveMCMetaImpl
public ImmersiveMCMetaImpl()
-
-
Method Details
-
compatibleWithAPIVersion
Description copied from interface:ImmersiveMCMeta
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 againstImmersiveMCMeta.getMajorAPIVersion()
andImmersiveMCMeta.getMinorAPIVersion()
.- Specified by:
compatibleWithAPIVersion
in interfaceImmersiveMCMeta
- 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
Description copied from interface:ImmersiveMCMeta
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.- Specified by:
getAPIVersion
in interfaceImmersiveMCMeta
- Returns:
- ImmersiveMC's internal API version following "partial semantic versioning".
-
getMajorAPIVersion
public int getMajorAPIVersion()- Specified by:
getMajorAPIVersion
in interfaceImmersiveMCMeta
- Returns:
- The major version number of ImmersiveMC's internal API. See
ImmersiveMCMeta.getAPIVersion()
for more info.
-
getMinorAPIVersion
public int getMinorAPIVersion()- Specified by:
getMinorAPIVersion
in interfaceImmersiveMCMeta
- Returns:
- The minor version number of ImmersiveMC's internal API. See
ImmersiveMCMeta.getAPIVersion()
for more info.
-