User: marc hermans Date: 29 Jul 22 18:24 Revision: eeb1d96ae4cbede63c0172d4dd5ba961dcfe9d18 Summary: Fix forge version detection to handle the case where FG is not running in Forge mode, but in Vanilla mode. (#1870) TeamCity URL: https://ci.denwav.dev/viewModification.html?tab=vcsModificationFiles&modId=8046&personal=false Index: src/main/kotlin/platform/mcp/gradle/datahandler/McpModelFG3Handler.kt =================================================================== --- src/main/kotlin/platform/mcp/gradle/datahandler/McpModelFG3Handler.kt (revision 4b626e210885c37dc605326770b4f6926fad8204) +++ src/main/kotlin/platform/mcp/gradle/datahandler/McpModelFG3Handler.kt (revision eeb1d96ae4cbede63c0172d4dd5ba961dcfe9d18) @@ -44,7 +44,7 @@ mcVersion = minecraftDepVersion.substring(0, index) val forgeVersionEnd = minecraftDepVersion.indexOf('_') - if (forgeVersionEnd != -1) { + if (forgeVersionEnd != -1 && forgeVersionEnd > index) { forgeVersion = minecraftDepVersion.substring(index + 1, forgeVersionEnd) } break