Class ModLoaderVersionBuilder<T extends IModLoaderVersion,B extends ModLoaderVersionBuilder<T,B>>

java.lang.Object
fr.flowarg.flowupdater.versions.ModLoaderVersionBuilder<T,B>
All Implemented Interfaces:
IBuilder<T>
Direct Known Subclasses:
FabricVersionBuilder, ForgeVersionBuilder, NeoForgeVersionBuilder, QuiltVersionBuilder

public abstract class ModLoaderVersionBuilder<T extends IModLoaderVersion,B extends ModLoaderVersionBuilder<T,B>> extends Object implements IBuilder<T>
  • Field Details

  • Constructor Details

    • ModLoaderVersionBuilder

      public ModLoaderVersionBuilder()
  • Method Details

    • withMods

      public B withMods(List<Mod> mods)
      Append a mod list to the version.
      Parameters:
      mods - mods to append.
      Returns:
      the builder.
    • withMods

      public B withMods(Mod... mods)
      Append a single mod or a mod array to the version.
      Parameters:
      mods - mods to append.
      Returns:
      the builder.
    • withMods

      public B withMods(URL jsonUrl)
      Append mods contained in the provided JSON url.
      Parameters:
      jsonUrl - The json URL of mods to append.
      Returns:
      the builder.
    • withMods

      public B withMods(String jsonUrl)
      Append mods contained in the provided JSON url.
      Parameters:
      jsonUrl - The json URL of mods to append.
      Returns:
      the builder.
    • withCurseMods

      public B withCurseMods(Collection<CurseFileInfo> curseMods)
      Append a mod list to the version.
      Parameters:
      curseMods - CurseForge's mods to append.
      Returns:
      the builder.
    • withCurseMods

      public B withCurseMods(CurseFileInfo... curseMods)
      Append a single mod or a mod array to the version.
      Parameters:
      curseMods - CurseForge's mods to append.
      Returns:
      the builder.
    • withCurseMods

      public B withCurseMods(URL jsonUrl)
      Append mods contained in the provided JSON url.
      Parameters:
      jsonUrl - The json URL of mods to append.
      Returns:
      the builder.
    • withCurseMods

      public B withCurseMods(String jsonUrl)
      Append mods contained in the provided JSON url.
      Parameters:
      jsonUrl - The json URL of mods to append.
      Returns:
      the builder.
    • withModrinthMods

      public B withModrinthMods(Collection<ModrinthVersionInfo> modrinthMods)
      Append a mod list to the version.
      Parameters:
      modrinthMods - Modrinth's mods to append.
      Returns:
      the builder.
    • withModrinthMods

      public B withModrinthMods(ModrinthVersionInfo... modrinthMods)
      Append a single mod or a mod array to the version.
      Parameters:
      modrinthMods - Modrinth's mods to append.
      Returns:
      the builder.
    • withModrinthMods

      public B withModrinthMods(URL jsonUrl)
      Append mods contained in the provided JSON url.
      Parameters:
      jsonUrl - The json URL of mods to append.
      Returns:
      the builder.
    • withModrinthMods

      public B withModrinthMods(String jsonUrl)
      Append mods contained in the provided JSON url.
      Parameters:
      jsonUrl - The json URL of mods to append.
      Returns:
      the builder.
    • withCurseModPack

      public B withCurseModPack(CurseModPackInfo modPackInfo)
      Assign to the future forge version a mod pack.
      Parameters:
      modPackInfo - the mod pack information to assign.
      Returns:
      the builder.
    • withModrinthModPack

      public B withModrinthModPack(ModrinthModPackInfo modPackInfo)
      Assign to the future forge version a mod pack.
      Parameters:
      modPackInfo - the mod pack information to assign.
      Returns:
      the builder.
    • withFileDeleter

      public B withFileDeleter(ModFileDeleter fileDeleter)
      Append a file deleter to the version.
      Parameters:
      fileDeleter - the file deleter to append.
      Returns:
      the builder.
    • build

      public abstract T build() throws BuilderException
      Description copied from interface: IBuilder
      Build a IBuilder object.
      Specified by:
      build in interface IBuilder<T extends IModLoaderVersion>
      Returns:
      a IBuilder object.
      Throws:
      BuilderException - if an error occurred when building an object.