Skip to content

Commit

Permalink
Add both mods from loading list and gamelibraries to GAME layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n committed Nov 1, 2023
1 parent fc9e266 commit 98abd4c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class ModValidator {
private static final Logger LOGGER = LogUtils.getLogger();
Expand Down Expand Up @@ -71,7 +72,12 @@ public ITransformationService.Resource getPluginResources() {
}

public ITransformationService.Resource getModResources() {
return new ITransformationService.Resource(IModuleLayerManager.Layer.GAME, this.loadingModList.getModFiles().stream().map(info -> info.getFile().getSecureJar()).toList());
var modFilesToLoad = Stream.concat(
// mods
this.loadingModList.getModFiles().stream().map(ModFileInfo::getFile),
// game libraries
this.candidateMods.stream().filter(type -> type.getType() == IModFile.Type.GAMELIBRARY));
return new ITransformationService.Resource(IModuleLayerManager.Layer.GAME, modFilesToLoad.map(ModFile::getSecureJar).toList());
}

private List<EarlyLoadingException.ExceptionData> validateLanguages() {
Expand Down

0 comments on commit 98abd4c

Please sign in to comment.