ModMenu icon indicating copy to clipboard operation
ModMenu copied to clipboard

Feature: Add mod update checker

Open spnda opened this issue 3 years ago • 6 comments

Resolves #84.

Replaces #235. Thanks @JoeZwet for all the work you have done to make this a reality.

I'm opening this pull request as the original author has said themselves they're caught up in work and not have much time to maintain this and there's not been any updates again for nearly a month. I hope they don't have anything against me taking over the work. I'm up to further maintain this and fix related issues.

New features in this PR:

  • [x] Fixed many major issues in the original codebase.
  • [x] A update notification toast on the title screen. (Can be disable through the settings)
  • [x] Can now read ModUpdater's custom mod json data.
  • [x] In addition to the CurseForge, GitHub, Maven and Modrinth update providers, I have added a GitLab update provider.
  • [ ] A custom, user-defined JSON file that can be used to provide update information for mods that don't add support themselves without the user having to edit the JAR or rebase and recompile the mod every update.

I have gone ahead and cleaned up some formatting, addressed some minor code issues and made the code properly compatible with JDK 16 and newer. I have also rewritten a large chunk of the update providers for more modularity and better using the fact Java is a object oriented language with generics. We sadly cannot use records for the data classes each ModUpdateProvider uses, because Gson doesn't natively support using records and adding a custom JSON factory just for a few classes seems like unnecessary work for realistically no gain.

Note: I'm thinking of adding more compatibility layers, so that more other mod updater mods other than ModUpdater also automatically work with this. What's your opinions on this?

spnda avatar Aug 24 '21 18:08 spnda

bruh

JustPyrrha avatar Aug 24 '21 22:08 JustPyrrha

@JoeZwet You have any issues with this PR? You can hit me up on discord if you want to: seΛn#6338

Btw, this is what the update notification looks like.

image

spnda avatar Aug 24 '21 23:08 spnda

@JoeZwet You have any issues with this PR? You can hit me up on discord if you want to: seΛn#6338

Btw, this is what the update notification looks like.

image

Looks good. Though you could always just commit to the original pr

JustPyrrha avatar Aug 24 '21 23:08 JustPyrrha

Looks good. Though you could always just commit to the original pr

As the first PR to your fork took a full month and there's been a lot of inactivity on your end, I decided to open a separate PR so that the updates get through quicker. There was a lot wrong in the original code and opening so many PRs and possibly needing to wait a month would substantially slow down the development and sorry, but I really couldn't be bothered. Also, if there's any reviews from the maintainers and someone has to wait another month for a PR to go through, we could see the PR be merged 2023. I hope you can agree that this might be the better (I'm active daily) solution but if you really want it to go through your original PR I would still be happy to PR my current changes into your fork.

spnda avatar Aug 25 '21 00:08 spnda

Is this still being worked on?

Jab125 avatar Aug 21 '22 08:08 Jab125

I've reimplemented this as a stand-alone mod (not released) and haven't rebased this fork in a while because of the lack of attention from the maintainers, they don't seem like they care much about this feature or simply don't have the time to review & test. I'd be perfectly happy to rebase, get feedback, and work on this feature.

spnda avatar Aug 21 '22 15:08 spnda

Superseded by #546. Thank you for your work on this, we would've used your work but a lot has changed in the last year and a half so we decided to go with a different approach.

Prospector avatar Feb 17 '23 04:02 Prospector