Class ImmersiveMCMetaImpl

java.lang.Object
com.hammy275.immersivemc.common.api_impl.ImmersiveMCMetaImpl
All Implemented Interfaces:
ImmersiveMCMeta

public class ImmersiveMCMetaImpl extends Object implements ImmersiveMCMeta
  • Field Details

  • Constructor Details

    • ImmersiveMCMetaImpl

      public ImmersiveMCMetaImpl()
  • Method Details

    • compatibleWithAPIVersion

      public boolean compatibleWithAPIVersion(String builtVersion) throws IllegalArgumentException
      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 against ImmersiveMCMeta.getMajorAPIVersion() and ImmersiveMCMeta.getMinorAPIVersion().
      Specified by:
      compatibleWithAPIVersion in interface ImmersiveMCMeta
      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

      public String 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 interface ImmersiveMCMeta
      Returns:
      ImmersiveMC's internal API version following "partial semantic versioning".
    • getMajorAPIVersion

      public int getMajorAPIVersion()
      Specified by:
      getMajorAPIVersion in interface ImmersiveMCMeta
      Returns:
      The major version number of ImmersiveMC's internal API. See ImmersiveMCMeta.getAPIVersion() for more info.
    • getMinorAPIVersion

      public int getMinorAPIVersion()
      Specified by:
      getMinorAPIVersion in interface ImmersiveMCMeta
      Returns:
      The minor version number of ImmersiveMC's internal API. See ImmersiveMCMeta.getAPIVersion() for more info.