Skip to content

Commit

Permalink
Fix logic miss
Browse files Browse the repository at this point in the history
  • Loading branch information
Kotori316 committed May 11, 2024
1 parent a68e2d5 commit 612aa72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
build_number=5
build_number=6
branch=1.20.5
mod_id=scala-library-object
# the dependencies are declared in gradle/libs.versions.toml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ public void validate(IModFile file, Collection<ModContainer> loadedContainers, I
});
mods.values().stream()
// Check mod has only 1 class for each mod id
.filter(dataList -> dataList.size() != 1 || dataList.stream().filter(ModClassData::isScalaObj).count() != 1)
.filter(dataList -> dataList.size() != 1 && dataList.stream().filter(ModClassData::isScalaObj).count() != 1)
.forEach(dataList -> {
var modId = dataList.getFirst().modID();
var classes = dataList.stream().map(ModClassData::className).toList();
var issue = ModLoadingIssue.error("Duplicated mod classes for %s, found: %s", modId, classes);
var issue = ModLoadingIssue.error("Duplicated mod classes for %s, found: %s".formatted(modId, classes));
reporter.addIssue(issue);
});
}
Expand Down

0 comments on commit 612aa72

Please sign in to comment.