Skip to content

Commit

Permalink
Fix mixin version detection on NeoForge
Browse files Browse the repository at this point in the history
  • Loading branch information
Juuxel committed Oct 31, 2023
1 parent 170e194 commit 53f82da
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,16 @@ public static void provide(MappingConfiguration mappingConfiguration, Project pr
if (lib.getAsString().contains("0.8.2")) {
dep = "net.fabricmc:sponge-mixin:0.8.2+build.24";
} else {
dep = "dev.architectury:mixin-patched" + lib.getAsString().substring(lib.getAsString().lastIndexOf(":")) + ".+";
String version = lib.getAsString().substring(lib.getAsString().lastIndexOf(":"));
// Used for the file extension, for example @jar
int atIndex = version.indexOf('@');

if (atIndex >= 0) {
// Strip the file extension away
version = version.substring(0, atIndex);
}

dep = "dev.architectury:mixin-patched" + version + ".+";
}
}
}
Expand Down

0 comments on commit 53f82da

Please sign in to comment.