Fix the hopefully last issue with GAMELIBRARY loading (#8162)

This commit is contained in:
Minecraftschurli authored and GitHub committed 2021-11-09 14:27:17 -08:00
1 parent 417798f2eb
commit dc9a7f6ad5
1 file changed
+3 -2
@@ -92,6 +92,7 @@ public class ModSorter
AtomicInteger counter = new AtomicInteger();
Map<IModFileInfo, Integer> infos = modFiles.stream()
.map(ModFile::getModFileInfo)
.filter(ModFileInfo.class::isInstance)
.collect(toMap(Function.identity(), e -> counter.incrementAndGet()));
infos.keySet().forEach(i -> graph.addNode((ModFileInfo) i));
modFiles.stream()
@@ -150,9 +151,9 @@ public class ModSorter
private void buildUniqueList()
{
// Collect mod files by first modid in the file. This will be used for deduping purposes
// Collect mod files by module name. This will be used for deduping purposes
final Map<String, List<IModFile>> modFilesByFirstId = modFiles.stream()
.collect(groupingBy(mf -> mf.getModInfos().get(0).getModId()));
.collect(groupingBy(mf -> mf.getModFileInfo().moduleName()));
// Capture forge and MC here, so we can keep them for later
forgeAndMC = new ArrayList<>();