Skip to content

Commit

Permalink
Validate jar and fail if it was built with Loom 1.5 or later. (#988)
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Jan 4, 2024
1 parent d9a436c commit a0aa6ea
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ public static ArtifactMetadata create(ArtifactRef artifact) throws IOException {
// Support opting into and out of remapping with "Fabric-Loom-Remap" manifest entry
remapRequirements = Boolean.parseBoolean(value) ? RemapRequirements.OPT_IN : RemapRequirements.OPT_OUT;
}

// Check to see if the jar was built with a newer version of loom.
// This version of loom does not support the remap type value so throw an exception.
if (mainAttributes.getValue("Fabric-Loom-Mixin-Remap-Type") != null) {
throw new IllegalStateException("This version of loom does not support the mixin remap type value. Please update to the latest version of loom.");
}
}

final Path installerPath = fs.getPath(INSTALLER_PATH);
Expand Down

0 comments on commit a0aa6ea

Please sign in to comment.