Skip to content

Commit

Permalink
Merge pull request #916 from pietro-lopes/fix-scanner
Browse files Browse the repository at this point in the history
added null check for module name and logging new recipe count
  • Loading branch information
LatvianModder authored Oct 21, 2024
2 parents 4a5391b + c88bae1 commit b1b0e0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,6 @@ private void addServerData(CallbackInfo ci) {
}

byType = recipesByType.build();
ConsoleJS.SERVER.info("Loaded " + byType.size() + " recipes");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ public static synchronized void scan(ResourceLocation registryName, ResourceLoca
var stack = Thread.currentThread().getStackTrace();

for (var stackTraceElement : stack) {
if (MODULES_TO_SKIP.contains(stackTraceElement.getModuleName())) {
var moduleName = stackTraceElement.getModuleName();
if (moduleName != null && MODULES_TO_SKIP.contains(moduleName)) {
continue;
}

Expand Down

0 comments on commit b1b0e0e

Please sign in to comment.