User: rednesto Date: 09 Aug 24 22:36 Revision: 0fcf7a75e451cae403186138b569a8e69f2b0ce6 Summary: Fix NeoForge versions not matching major mc release correctly TeamCity URL: https://ci.mcdev.io/viewModification.html?tab=vcsModificationFiles&modId=9576&personal=false Index: changelog.md =================================================================== --- changelog.md (revision abee07f2ea12aa639d1d93307386ddc652730c4d) +++ changelog.md (revision 0fcf7a75e451cae403186138b569a8e69f2b0ce6) @@ -28,6 +28,7 @@ - [#2282](https://github.com/minecraft-dev/MinecraftDev/issues/2282) Mixin support confusion with `$` and `.` separators in class names - Recent NeoModDev version import errors - Recommended Artifact ID value was not sanitized properly +- NeoForge versions in the Architectury were not being matched correctly for the first version of a major Minecraft release ## [1.8.0] Index: src/main/kotlin/platform/neoforge/version/NeoForgeVersion.kt =================================================================== --- src/main/kotlin/platform/neoforge/version/NeoForgeVersion.kt (revision abee07f2ea12aa639d1d93307386ddc652730c4d) +++ src/main/kotlin/platform/neoforge/version/NeoForgeVersion.kt (revision 0fcf7a75e451cae403186138b569a8e69f2b0ce6) @@ -48,7 +48,11 @@ fun getNeoForgeVersions(mcVersion: SemanticVersion): List { val versionText = mcVersion.toString() // Drop the 1. part of the mc version - val shortMcVersion = versionText.substringAfter('.') + var shortMcVersion = versionText.substringAfter('.') + if (!shortMcVersion.contains('.')) { + // Ensure we have the .0 part + shortMcVersion = "$shortMcVersion.0" + } val toList = versions.asSequence() .filter { it.substringBeforeLast('.') == shortMcVersion } .mapNotNull(SemanticVersion::tryParse)