Remove embedded Cloth Config library to reduce jar size
K0-RR opened this issue ยท 4 comments
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.
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?
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.
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...
Completed with 1acf7e2