From 6fa5f1c366ae81c26da4f00682231ccace06107c Mon Sep 17 00:00:00 2001 From: Kam Date: Thu, 12 Mar 2026 01:25:06 -0400 Subject: [PATCH] Fix Submodule Resources --- gradle.sourceInjection.gradle | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gradle.sourceInjection.gradle b/gradle.sourceInjection.gradle index ec6bad8..19d57f1 100644 --- a/gradle.sourceInjection.gradle +++ b/gradle.sourceInjection.gradle @@ -178,7 +178,7 @@ def isInjectedClass = { String classPath -> } def isInjectedResource = { String resPath -> - injectedResDirs.any { new File(it, resPath).exists() } + injectedResDirs.any { def f = new File(it, resPath); f.exists() && f.isFile() } } // ============================================================================ @@ -191,6 +191,11 @@ def isInjectedResource = { String resPath -> jar { includeEmptyDirs = false duplicatesStrategy = DuplicatesStrategy.EXCLUDE + + // Ensure processed resources (including assets/) are included in the jar. + // The GTNH convention plugin may not include them from processResources output. + from("$buildDir/resources/main") + exclude { details -> def path = details.relativePath.pathString if (path == 'mcmod.info') return false // keep merged mcmod.info