Interface IModLanguageLoader

All Known Implementing Classes:
BuiltInLanguageLoader, FMLJavaModLanguageProvider, MinecraftModLanguageProvider

public interface IModLanguageLoader
Loaded as a ServiceLoader, from the plugin layer. Jars in the mods directory must have an FMLModType of IModFile.Type.LIBRARY to be loaded on the plugin layer.

Version data is read from the manifest's implementation version.

  • Method Details

    • name

      String name()
      Returns the name of this loader, used to decide what loader should load a mod.
      Returns:
      the name of this loader, used to decide what loader should load a mod
    • version

      String version()
      Returns the version of this loader.
      Returns:
      the version of this loader
    • loadMod

      ModContainer loadMod(IModInfo info, ModFileScanData modFileScanResults, ModuleLayer layer) throws ModLoadingException
      Load and build a container from the given mod information.
      Parameters:
      info - the mod information
      modFileScanResults - the mod scan data
      layer - the module layer of the mod
      Returns:
      the built mod container
      Throws:
      ModLoadingException - if loading encountered an exception
    • validate

      default void validate(IModFile file, Collection<ModContainer> loadedContainers, IIssueReporting reporter)
      Validate mod files using this loader, and report any issues (such as entrpoints without medatata).
      Parameters:
      file - the file to validate
      loadedContainers - the containers of mods in the file, that have been created using this loader. This list does not contain errored containers
      reporter - the interface used to report issues to the game