Patch ModSorter to include forge mod in forgeAndMC list (#8043)

This commit is contained in:
sciwhiz12 authored and GitHub committed 2021-09-01 07:26:29 -07:00
1 parent 19f470ee8c
commit dcfbc08504
5 files changed
+80

No files matched your search

@@ -161,6 +161,10 @@ public class ModSorter
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()