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

Remove embedded Cloth Config library to reduce jar size #4

Closed
K0-RR opened this issue Jul 31, 2021 · 4 comments
Closed

Remove embedded Cloth Config library to reduce jar size #4

K0-RR opened this issue Jul 31, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@K0-RR
Copy link

K0-RR commented Jul 31, 2021

This lib is highly popular and its size is huge. It gets included in many mods so the modpack with 80 mods is 40 MB bigger in size than needed.

@Gluton-Official
Copy link
Owner

Gluton-Official commented Jul 31, 2021

I don't like the idea of a required dependency for a mod, especially one that's supposed to be really simple. I haven't gotten a chance to investigate the abnormally large jar, but if you're saying it's Cloth Config, I suppose I could have two builds, one with Cloth Config embedded and one without it. Alternatively, I could possibly remove the required dependency, but then I feel like that's a lot of absent customizability (removing the overlay, smooth panning, etc), but then again, Mod Menu is needed for that anyways. I figured Mod Menu would be included in someone's pack that they threw together more often than Cloth Config, but I'm not too familiar with the Fabric modpack scene.

I think what I'll do is upload a non-Cloth-Config-embedded build to CurseForge later today, then for the upcoming 0.3.0 version, I'll have it be an optional dependency. How does that sound?

@K0-RR
Copy link
Author

K0-RR commented Jul 31, 2021

I think what I'll do is upload a non-Cloth-Config-embedded build to CurseForge later today, then for the upcoming 3.0 version, I'll have it be an optional dependency. How does that sound?

Yeah, I know about another mod that has a "no-bundled-cloth" version, having it as optional is great too.

I haven't gotten a chance to investigate the abnormally large jar, but if you're saying it's Cloth Config...

Your jar is 868,23 KB with cloth and 21,7 KB without it.

Also, I think there are other config libraries, I found this https://www.curseforge.com/minecraft/mc-mods/midnightlib, but I know having to learn a config system (is this how stuff like config libraries work?) again may not be what you want.

@Gluton-Official
Copy link
Owner

Cloth Config is cross compatible with Forge, so it should make porting to Forge easier when I get to that, although I'm not sure about AutoConfig, which is embedded in Cloth Config, since Forge has its own config serializer.

but I know having to learn a config system (is this how stuff like config libraries work?) again may not be what you want.

For the most part, config libraries operate around the same general premise, but MidnightLib is lacking some useful features that I use, such as save and load listeners when changing the item required for using the spyglass keybind's item ID, so I can update the Item I check for without having to go parsing a possibly invalid ID the every time you press the keybind. It um, also has hats...

@Gluton-Official Gluton-Official added the enhancement New feature or request label Aug 1, 2021
@Gluton-Official Gluton-Official self-assigned this Aug 1, 2021
@Gluton-Official Gluton-Official changed the title Don't nest cloth config. Remove embedded Cloth Config library to reduce jar size Aug 1, 2021
@Gluton-Official
Copy link
Owner

Completed with 1acf7e2

CurseForge download available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants