Platform Tools

Platform-specific tools

  1. is mod loaded
  2. get mod version
  3. get environment
  4. get config path
  5. get mod loader id

is mod loaded

Check, whether a mod with the specified modid is loaded

PlatformData.isModLoaded(modid);

get mod version

Returns the mod version, parsed as ModuleDescriptor.Version, if a mod with the specified id was found.

PlatformData.getModVersion(modid);

get environment

Returns the EnvType on Fabric-like and Dist on Forge-like mod-loaders.

PlatformData.getEnv();

get config path

Returns the Path, where all the mod configurations should be stored.

PlatformData.getConfigPath();

get mod loader id

Returns an enum value, where valid values are FABRIC, FORGE, NEOFORGE, OTHER.

PlatformData.getModLoaderId();

Continue with Version Checker