User: rednesto Date: 30 Apr 23 12:30 Revision: 2ff36bcc6f2c6bf6e865ba4ec7730534be702877 Summary: Make FabricLoomData#modSourceSets nullable Fixes minecraft-dev/mcdev-error-report#816 when loading previous projects data TeamCity URL: https://ci.mcdev.io/viewModification.html?tab=vcsModificationFiles&modId=8476&personal=false Index: src/main/kotlin/platform/fabric/reference/FabricModJsonResolveScopeEnlarger.kt =================================================================== --- src/main/kotlin/platform/fabric/reference/FabricModJsonResolveScopeEnlarger.kt (revision 9303a12b16df23dd094e1fef0286440675c55f96) +++ src/main/kotlin/platform/fabric/reference/FabricModJsonResolveScopeEnlarger.kt (revision 2ff36bcc6f2c6bf6e865ba4ec7730534be702877) @@ -33,11 +33,13 @@ val loomData = GradleUtil.findGradleModuleData(module)?.children ?.find { it.key == FabricLoomData.KEY }?.data as? FabricLoomData ?: return null + val modSourceSets = loomData.modSourceSets + ?: return null val moduleScopes = mutableListOf() val moduleManager = ModuleManager.getInstance(project) val parentPath = module.name.substringBeforeLast('.') - for ((_, sourceSets) in loomData.modSourceSets) { + for ((_, sourceSets) in modSourceSets) { for (sourceSet in sourceSets) { val childModule = moduleManager.findModuleByName("$parentPath.$sourceSet") if (childModule != null) { Index: src/main/kotlin/platform/mcp/fabricloom/FabricLoomData.kt =================================================================== --- src/main/kotlin/platform/mcp/fabricloom/FabricLoomData.kt (revision 9303a12b16df23dd094e1fef0286440675c55f96) +++ src/main/kotlin/platform/mcp/fabricloom/FabricLoomData.kt (revision 2ff36bcc6f2c6bf6e865ba4ec7730534be702877) @@ -21,7 +21,7 @@ val tinyMappings: File?, val decompileTasks: Map>, val splitMinecraftJar: Boolean, - val modSourceSets: Map> + val modSourceSets: Map>? = null ) : AbstractExternalEntityData(module.owner) { data class Decompiler(val name: String, val taskName: String, val sourcesPath: String)