Class ModFormats

java.lang.Object
dev.puzzleshq.mod.ModFormats

public class ModFormats extends Object
Use for managing mod formats and containers.
Since:
1.0.0
  • Constructor Details

    • ModFormats

      public ModFormats()
  • Method Details

    • initDefaultFormats

      public static void initDefaultFormats()
      Initialise the default mod formats.
    • register

      public static void register(Function<String, IModContainer> containerFunction)
      Registers a function that gets the IModContainer of a mod ID.
      Parameters:
      containerFunction - the function to register.
    • register

      public static void register(Integer spec, IModFormat format)
      Registers a mod format.
      Parameters:
      spec - the formats version.
      format - the IModFormat format.
    • getContainer

      public static IModContainer getContainer(String id)
      Gets the IModContainer of a mod.
      Parameters:
      id - the id of the mod.
      Returns:
      IModContainer
    • getFormat

      public static IModFormat getFormat(Integer spec)
      Gets the format of the given version.
      Parameters:
      spec - the version of the format.