Interface Mod


public interface Mod
  • Method Details

    • getModId

      String getModId()
    • getVersion

      String getVersion()
    • getName

      String getName()
    • getDescription

      String getDescription()
    • getLogoFile

      Optional<String> getLogoFile(int preferredSize)
      Gets the logo file path of the mod
      Parameters:
      preferredSize - the preferred logo size, only used in fabric
      Returns:
      the logo file path relative to the file
    • getFilePaths

      List<Path> getFilePaths()
      Gets a list of all possible root paths for the mod. This is especially relevant on Fabric, as a single mod may have multiple source sets (such as client / server-specific ones), each corresponding to one root path.
      Returns:
      A list of root paths belonging to the mod
    • getFilePath

      @Deprecated(forRemoval=true) Path getFilePath()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use getFilePaths() instead
    • findResource

      Optional<Path> findResource(String... path)
      Gets an NIO Path to the given resource contained within the mod file / folder. The path is verified to exist, and an empty optional is returned if it doesn't.
      Parameters:
      path - The resource to search for
      Returns:
      The path of the resource if it exists, or Optional.empty() if it doesn't
    • getAuthors

      Collection<String> getAuthors()
    • getLicense

      @Nullable @Nullable Collection<String> getLicense()
    • getHomepage

      Optional<String> getHomepage()
    • getSources

      Optional<String> getSources()
    • getIssueTracker

      Optional<String> getIssueTracker()
    • registerConfigurationScreen

      @Environment(CLIENT) void registerConfigurationScreen(Mod.ConfigurationScreenProvider provider)