Skip to content

Commit f24ad0d

Browse files
committed
Validate jar and fail if it was built with Loom 1.5 or later. (#988)
1 parent ffc786d commit f24ad0d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/net/fabricmc/loom/configuration/mods/ArtifactMetadata.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ public static ArtifactMetadata create(ArtifactRef artifact) throws IOException {
6464
// Support opting into and out of remapping with "Fabric-Loom-Remap" manifest entry
6565
remapRequirements = Boolean.parseBoolean(value) ? RemapRequirements.OPT_IN : RemapRequirements.OPT_OUT;
6666
}
67+
68+
// Check to see if the jar was built with a newer version of loom.
69+
// This version of loom does not support the remap type value so throw an exception.
70+
if (mainAttributes.getValue("Fabric-Loom-Mixin-Remap-Type") != null) {
71+
throw new IllegalStateException("This version of loom does not support the mixin remap type value. Please update to the latest version of loom.");
72+
}
6773
}
6874

6975
final Path installerPath = fs.getPath(INSTALLER_PATH);

0 commit comments

Comments
 (0)