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

Add support for PrismMC's .disabled mods #34

Closed
JustSimplyKyle opened this issue May 2, 2022 · 18 comments
Closed

Add support for PrismMC's .disabled mods #34

JustSimplyKyle opened this issue May 2, 2022 · 18 comments
Labels
enhancement Improvements to the project

Comments

@JustSimplyKyle
Copy link
Contributor

JustSimplyKyle commented May 2, 2022

Currently I'm using ferium witn polymc, and when I'm debugging mods I will often disable mods via polymc. When a mod is disabled, it will add .disabled at the end of the mod name. But when I do ferium upgrade, it will automatically "enable" the mod again. I want ferium to not touch .disabled mods.

@theRookieCoder theRookieCoder changed the title Add support for .disabled mods Add support for .disabled mods May 2, 2022
@theRookieCoder theRookieCoder changed the title Add support for .disabled mods Add support for .disabled mods May 2, 2022
@theRookieCoder
Copy link
Collaborator

theRookieCoder commented May 2, 2022

But if the mod has an upgrade could it upgrade the disabled mod (keeping it disabled ofc)? And does PolyMC deal with the disabled mods or are they not loaded by mod loaders?

@theRookieCoder theRookieCoder added the enhancement Improvements to the project label May 2, 2022
@JustSimplyKyle
Copy link
Contributor Author

JustSimplyKyle commented May 2, 2022

Well I guess no, not until the mod got enabled again in polymc.
The mod loader just ignores mod that doesn't end with .jar

@JustSimplyKyle
Copy link
Contributor Author

Or you could still upgrade it, but keep it disabled.
Also, some other launcher will not use .disabled, some will use .old instead

@theRookieCoder
Copy link
Collaborator

theRookieCoder commented May 2, 2022

I just realised that we would need to find out which mod was disabled, because it might be an old version. This is again the same problem as #17, identifying which mod a file belongs to. Modrinth actually has this functionality but CurseForge doesn't :(

@JustSimplyKyle
Copy link
Contributor Author

JustSimplyKyle commented May 2, 2022

Hmm, wouldn't it be possible using the current updating method? I believe the current updating method is just comparing filenames. If it's that, couldn't you just first ignore the .disabled name and only compare the part that doesn't have it?(e.g. if i disable a mod with name iris-1.18.2-1.1.4.jar, it will become iris-1.18.2-1.1.4.jar.disabled)
And after downloading the mod, rename the new mod to have an end with .disabled, and delete the "original" .disabled mod

@theRookieCoder
Copy link
Collaborator

theRookieCoder commented May 2, 2022

That's what I thought at first. But the problem is that if an old version was disabled, Ferium would just download the new version and end up 'enabling' the mod again :(

For example if you had iris-1.18.2-1.1.3.jar.disabled but then iris-1.18.2-1.1.4.jar came out, the disabled version would remain but the newer 1.1.4 will be downloaded, effectively enabling Iris again. I can't disable the new version again because the I don't know what mod the old version is

@JustSimplyKyle
Copy link
Contributor Author

Oh I know what you mean! This is quite a nasty problem to solve...
Maybe add a boolean to the config to signifies that the mod is disabled? And when ferium checks for upgrading, if the mod is set disabled in config, just straight up don't touch it

@theRookieCoder
Copy link
Collaborator

Oh yeah that's possible but it's not quite convenient because you would disabled the mod in polymc and ferium

@theRookieCoder
Copy link
Collaborator

This is quite a nasty problem to solve...

I wonder how other mod managers like PolyMC itself deal with this

@JustSimplyKyle
Copy link
Contributor Author

Couldn't you just auto detect a mod with file extension .disabled and auto add it to config?(maybe first ask it when upgrading, smth like (Do you want to disable this mod in Ferium?)
And when got enabled again, ferium could detect that in config, the mod is disabled, but in the folder, it doesn't have the .disabled file ending, so ferium enables it in config and upgrades it

@JustSimplyKyle
Copy link
Contributor Author

This is quite a nasty problem to solve...

I wonder how other mod managers like PolyMC itself deal with this

Well iirc, I don't think PolyMC has auto upgrading, it's a planned feature in 1.3.0, but it has not been implemented

@theRookieCoder
Copy link
Collaborator

theRookieCoder commented May 2, 2022

Couldn't you just auto detect a mod with file extension .disabled and auto add it to config?

Sigh same problem again, how would I know what mod was disabled? Even if I used the filename, it might be an older version, yada yada...

@theRookieCoder
Copy link
Collaborator

theRookieCoder commented May 2, 2022

I wonder how other mod managers like PolyMC itself deal with this

But it seems to be able to detect which mods are in the mods directory. If I remove a few mods, it doesn't show those mods in the menu. But yeah it can't update them

@JustSimplyKyle
Copy link
Contributor Author

Well maybe they just don't store it in another config
They just kept checking what mods are in the directory
I could be wrong tho, I don't know how does PolyMC works
And another question, does curseforge api doesn't have hash checking?

@theRookieCoder
Copy link
Collaborator

theRookieCoder commented May 2, 2022

They just kept checking what mods are in the directory

Yup that's what they do. They even parse the mod manifests here. It's C++ though so I don't really understand how they're doing stuff.

And another question, does curseforge api doesn't have hash checking?

That's the problem, it doesn't afaik. I requested it here so go give it an upvote.

@JustSimplyKyle
Copy link
Contributor Author

From my rough reading, it seems like they do read into fabric.mod.json and save things from it

@JustSimplyKyle
Copy link
Contributor Author

Although it seems like the forge formats are a lot more complicated

@theRookieCoder theRookieCoder changed the title Add support for .disabled mods Add support for PrismMC's .disabled mods Mar 24, 2023
@theRookieCoder
Copy link
Collaborator

Moved to #219

@theRookieCoder theRookieCoder closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to the project
Development

No branches or pull requests

2 participants