Skip to content

Commit

Permalink
Patch ModSorter to include forge mod in forgeAndMC list
Browse files Browse the repository at this point in the history
  • Loading branch information
sciwhiz12 committed Aug 31, 2021
1 parent 19f470e commit 220f2ac
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ private void buildUniqueList()
forgeAndMC.add((ModFile) mc.get(0));
else
throw new IllegalStateException("Failed to find minecraft somehow?");
// TODO: remove this hardcoding and make it more flexible
var forge = modFilesByFirstId.get("forge");
if (forge != null && !forge.isEmpty())
forgeAndMC.add((ModFile) forge.get(0)); // Silently ignore if Forge isn't present

// Select the newest by artifact version sorting of non-unique files thus identified
this.modFiles = modFilesByFirstId.entrySet().stream()
Expand Down

0 comments on commit 220f2ac

Please sign in to comment.