include integrated (provided from game plugin) mod in dependency resolution
Some checks failed
Publish to snapshot maven / build (push) Failing after 2m14s

This commit is contained in:
moehreag 2024-06-17 21:20:14 +02:00
parent 58b75daa8b
commit 323ef735a6
2 changed files with 4 additions and 2 deletions

View file

@ -7,7 +7,7 @@ plugins {
}
group = "dev.frogmc"
version = "0.0.1-alpha.10"
version = "0.0.1-alpha.11"
repositories {
maven {

View file

@ -2,6 +2,7 @@ package dev.frogmc.frogloader.impl;
import java.nio.file.Path;
import java.util.*;
import java.util.stream.Stream;
import dev.frogmc.frogloader.api.FrogLoader;
import dev.frogmc.frogloader.api.mod.ModProperties;
@ -53,7 +54,8 @@ public class PluginLoader {
}
}
Collection<ModProperties> flattened = properties.values().stream().flatMap(Collection::stream).toList();
Collection<ModProperties> flattened = Stream.concat(properties.values().stream().flatMap(Collection::stream),
mods.values().stream().map(Map::values).flatMap(Collection::stream)).toList();
try {
Collection<ModProperties> solved = new ModDependencyResolver(flattened).solve();
properties.forEach((s, c) -> c.retainAll(solved));