Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support *.jar.disabled mods #3144

Open
rhullah opened this issue Nov 9, 2024 · 3 comments
Open

Support *.jar.disabled mods #3144

rhullah opened this issue Nov 9, 2024 · 3 comments

Comments

@rhullah
Copy link
Contributor

rhullah commented Nov 9, 2024

Enhancement Type

A completely new feature

Describe the enhancement

Some launchers allow you to disable installed mods as a way to prevent it from being used and not having to fully remove it. I usually use this if I'm testing things and likely want to return to using the mod after tests. If I was to do this with the image now, it would just redownload the mod that was renamed .jar.disabled.

I was wondering the possibility of supporting this file naming as an alternative to the mod's expected filename? That way the system recognizes that the mood is there and doesn't redownload it.

@itzg
Copy link
Owner

itzg commented Nov 9, 2024

That's a great idea. I'll research the code around there but off hand I'm thinking that's quite doable.

@itzg itzg moved this to In progress in Docker Minecraft Nov 9, 2024
@itzg
Copy link
Owner

itzg commented Nov 9, 2024

Implementation notes

Manifest integrity check:

https://github.com/itzg/mc-image-helper/blob/ede488ce5d8e3b90334eb4414228ef8957def448/src/main/java/me/itzg/helpers/files/Manifests.java#L125

To handle "download to directory" mode's file existence check:

https://github.com/itzg/mc-image-helper/blob/0161ae3dd56d221695033f9dc1c999b8019dbc6c/src/main/java/me/itzg/helpers/files/ReactiveFileUtils.java#L33

Specific file download mode, which should probably be enhanced to use same as me.itzg.helpers.http.OutputToDirectoryFetchBuilder#skipExisting(reactor.netty.http.client.HttpClientResponse, java.nio.file.Path)

https://github.com/itzg/mc-image-helper/blob/df3c8e91de06345db06b9a4a87ecf7854af07aaf/src/main/java/me/itzg/helpers/http/SpecificFileFetchBuilder.java#L59

@rhullah
Copy link
Contributor Author

rhullah commented Nov 9, 2024

Excellent, thanks for looking into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

2 participants