Skip to content

Commit

Permalink
Update ModSorter.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Dec 14, 2023
1 parent 5ad65bf commit bf68c98
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions loader/src/main/java/net/neoforged/fml/loading/ModSorter.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ public static LoadingModList sort(List<ModFile> mods, final List<EarlyLoadingExc
// try and validate dependencies
final DependencyResolutionResult resolutionResult = ms.verifyDependencyVersions();

final List<EarlyLoadingException.ExceptionData> warnings = new ArrayList<>();

final LoadingModList list;

// if we miss a dependency or detect an incompatibility, we abort now
Expand Down Expand Up @@ -203,10 +201,12 @@ public record DependencyResolutionResult(
Map<String, ArtifactVersion> modVersions
) {
public List<EarlyLoadingException.ExceptionData> buildWarningMessages() {
return conflicts.stream()
return Stream.concat(conflicts.stream()
.map(mv -> new EarlyLoadingException.ExceptionData("fml.modloading.conflictingmod",
mv.getOwner(), mv.getModId(), mv.getOwner().getModId(), mv.getVersionRange(),
modVersions.get(mv.getModId()), mv.getReason().orElse("fml.modloading.conflictingmod.noreason")))
modVersions.get(mv.getModId()), mv.getReason().orElse("fml.modloading.conflictingmod.noreason"))),

Stream.of(new EarlyLoadingException.ExceptionData("fml.modloading.conflictingmod.proceed")))
.toList();
}

Expand Down

0 comments on commit bf68c98

Please sign in to comment.