Add compatibility with Forge's update checker and Catalogue modmenu #1933
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add compatibility with Forge's update checker (via custom property
forgeUpdateJSONURL) + Added compatibility with the Catalogue modmenu (submit bug url)The Issue
Currently, mods loaded via Connector cannot use (Neo)Forge's update checker. Moreover, the bug tracker URL doesn't seem to be set, which prevents some modmenus like Catalogue from displaying a "Sumbit bug report" button on the mod's page.
The Proposal
This pull request proposes to add support for this update checker by setting the mod's
updateJSONURLto the value of a custom attribute in itsfabric.mod.jsonnamedforgeUpdateJSONURL.Also, the
issueTrackerURLis set to the value of theissuesfield in the contact information.Possible Side Effects
Probably none. The Forge's update checker will only be used if the mod has a
forgeUpdateJSONURLcustom field in its manifest.Maybe the bug report URL should be changed to a confirmation page about this mod being loaded with Connector (maybe something like https://sinytra.org/connector_warning?redirect_to=).
Alternatives
While most players probably use launchers to manage their mods, adding compatibility with Forge's update checker will also notify players on the main menu (moreover the changes in themselves are pretty small).
Also, making Forge aware of the mod's bug report URL could maybe help in easier bug reports for players (as mentioned in Possible Side Effects maybe it should first redirect to a confirmation page).
Maybe the PR should be split in 2 (one for the Forge update checker and one for the issue tracker) ?
Additional Notes
I'm not a native English speaker, and this is my first public PR
If this PR is successful I will probably also port it to the 1.21.1 branch