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
Crash when mods folder contains jar file without mods.toml #9968
Comments
Could you provide a test jar please? The commit you're referencing should not have any impact for your scenario, as it only applies to mod jars that contain an invalid mods.toml. It shouldn't make a difference for jars missing a mods.toml altogether |
Since this issue mentions a log with SpongeForge, I am going to assume that you are attempting to load a Sponge plugin with Forge. Since Sponge should load plugins from the If I recall correctly, Forge not playing nice with non-Forge mods in the mods folder is intended behavior, to attempt to inform the user that they might not be using the correct build of a mod for Forge (i.e. they might've downloaded a Fabric mod and are trying to use it on Forge). I invite @PaintNinja to correct me if I'm wrong. Regardless, here's WorldEdit for Sponge. I just yoinked it off of Ore since it's one of their most downloaded plugins: WorldEdit 7.2.16+6534-206eb4 |
You can use any jar that doesn't have a mods.toml. The |
I have similar issue when including FabricMC mods in the folder or FeatureCreep mods when they end in .jar. FeatureCreep (which I am the lead dev of) looks for custom jars in the mods folder and since CurseForge only allows a small number of extensions there is little choice than having them set .jar and other abstraction layers may have issues as well especially since most modpack formats default to the mods folder. It provides an error on the screen saying invalid modfile but does not let me continue loading like before. This only happens on version 49.0.45 and above or on 1.20.6 versions. On 49.0.43 and before it works fine.
I know you did some changes around lines 96-98 and that is where it is crashing from |
Evidence for @PaintNinja to indicate it worked prior to this release to actually load files: https://gist.github.com/LordRalex/3aef9ab3f668bb90d03497cc47c2927c#file-debug-log-L2449 - .43 with Sponge, and AutoPickup loading from it: https://gist.github.com/LordRalex/a91879a92b3b7e65e3d6099fa93674fa .45 where it fails |
So the issue is that your change to actually respect loading errors meant that a previously silently ignored exception was surfaced. So ya, Jonathing is correct that warning users about non-forge mods in the mods folder WAS an intended feature, but due to the poor design of FML it seems that in actuality it was just silently ignored and people have come to rely on that functionality. So I just made it log a message and ignore the file, should be working as it was before. |
Minecraft Version: 1.20.4
Forge Version: 49.0.45 (doesn't happen with 49.0.43)
Logs: https://gist.github.com/Yeregorix/9befc77621fb5f9be9d95e70c315ce53
Logs with SpongeForge: https://gist.github.com/Yeregorix/a4717c408fa77ed8f2d7a74bf250319e (nearly identical)
Steps to Reproduce:
Description of issue:
Forge crashes when the mods folder contains a jar file without mods.toml. This prevents the installation of SpongeForge plugins.
This issue has likely been introduced by commit e0dccae .
The text was updated successfully, but these errors were encountered: