Interface IModFileReader

All Superinterfaces:
IOrderedProvider
All Known Implementing Classes:
JarModsDotTomlModFileReader, NestedLibraryModReader

public interface IModFileReader extends IOrderedProvider
Inspects JarContents found by IModFileCandidateLocator and tries to turn them into IModFile.

Picked up via ServiceLoader.

  • Method Details

    • read

      @Nullable @Nullable IModFile read(cpw.mods.jarhandling.JarContents jar, ModFileDiscoveryAttributes attributes)
      Provides a mod from the given jar.

      Throwing ModLoadingException will report contained issues as the reason for incompatibility to players, unless another reader successfully reads the jar.

      Other thrown exceptions will be reported as errors and cause loading to fail.

      Parameters:
      jar - the mod jar contents
      attributes - The attributes relating to this mod files discovery.
      Returns:
      null if this provider can't handle the given jar, otherwise the mod-file created from the given contents and attributes.