Skip to content

Commit 13e9391

Browse files
authored
Fix #239: NeoForge 1.20.1 not being usable (#254)
1 parent 794fa20 commit 13e9391

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/legacy/java/net/neoforged/moddevgradle/legacyforge/internal/LegacyForgeModDevPlugin.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,13 @@ public void enable(Project project, LegacyForgeModdingSettings settings, LegacyF
131131
throw new InvalidUserCodeException("Specifying a Forge version is mutually exclusive with NeoForge or MCP");
132132
}
133133

134-
versionCapabilities = VersionCapabilitiesInternal.ofForgeVersion(forgeVersion);
135-
artifactNamingStrategy = ArtifactNamingStrategy.createNeoForge(versionCapabilities, "forge", forgeVersion);
134+
var version = forgeVersion != null ? forgeVersion : neoForgeVersion;
135+
versionCapabilities = VersionCapabilitiesInternal.ofForgeVersion(version);
136+
artifactNamingStrategy = ArtifactNamingStrategy.createNeoForge(versionCapabilities, "forge", version);
136137

137138
String groupId = forgeVersion != null ? "net.minecraftforge" : "net.neoforged";
138-
var neoForge = depFactory.create(groupId + ":forge:" + forgeVersion);
139-
var neoForgeNotation = groupId + ":forge:" + forgeVersion + ":userdev";
139+
var neoForge = depFactory.create(groupId + ":forge:" + version);
140+
var neoForgeNotation = groupId + ":forge:" + version + ":userdev";
140141
dependencies = ModdingDependencies.create(neoForge, neoForgeNotation, null, null, versionCapabilities);
141142
} else if (mcpVersion != null) {
142143
versionCapabilities = VersionCapabilitiesInternal.ofMinecraftVersion(mcpVersion);

0 commit comments

Comments
 (0)