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 TypeMethodDescriptionbooleancompatibleWithAPIVersion(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.intint
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ImmersiveMCMetaImpl
public ImmersiveMCMetaImpl()
-
-
Method Details
-
compatibleWithAPIVersion
Description copied from interface:ImmersiveMCMetaGiven 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:
compatibleWithAPIVersionin 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:ImmersiveMCMetaGets 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:
getAPIVersionin interfaceImmersiveMCMeta- Returns:
- ImmersiveMC's internal API version following "partial semantic versioning".
-
getMajorAPIVersion
public int getMajorAPIVersion()- Specified by:
getMajorAPIVersionin interfaceImmersiveMCMeta- Returns:
- The major version number of ImmersiveMC's internal API. See
ImmersiveMCMeta.getAPIVersion()for more info.
-
getMinorAPIVersion
public int getMinorAPIVersion()- Specified by:
getMinorAPIVersionin interfaceImmersiveMCMeta- Returns:
- The minor version number of ImmersiveMC's internal API. See
ImmersiveMCMeta.getAPIVersion()for more info.
-