Skip to content

Support *.jar.disabled mods #3144

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

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

Support *.jar.disabled mods #3144

rhullah opened this issue Nov 9, 2024 · 5 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!

@azunaVT
Copy link
Contributor

azunaVT commented Jan 26, 2025

I'm not sure my need was the same here but somewhat close to this issue's content, I needed to disable mods when downloading a generic pack (GTNH in my case) before applying it, I've done a POC to allow disabling certain mods when downloading generic packs:
azunaVT#1

@itzg is this something we'd be interested in having in this repo / image? If we could, that'd be great because I wouldn't have to rely on a locally built image or maintain a fork for my specific need 😄 I seems to work fine with manifest generation / checking. Otherwise, feel free to comment on the POC and let me know if there's any improvements / changes we'd need to get my changes into this repo!

@itzg
Copy link
Owner

itzg commented Jan 26, 2025

@azunaVT your scenario/solution is not really related, but I appreciate you sharing your enhancement. A PR would be great where I can provide some more precise comments.

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

3 participants