Cazsius / Spice-of-Life-Carrot-Edition

Motivating people to explore new foods with the carrot, not the stick.
GNU Lesser General Public License v2.1
15 stars 43 forks source link

[1.20.1] Crash with Modernfix? #149

Open Reshy opened 8 months ago

Reshy commented 8 months ago

https://pastebin.com/Nma141Fd

No idea why this would cause a crash, probably an issue with exception handling?

juliand665 commented 8 months ago

It looks like you're correctly diagnosing this as an incompatibility with ModernFix! It seems to be loading our config before we expect it to be. Specifically, we rely on FMLLoadCompleteEvent being called first, so when the config is loaded, we can use it to filter every food in the game through the configured blacklist.

It wouldn't be hard to change that, but I really feel like this is not something ModernFix should be doing in the first place, since our mod is bound to not be the only one relying on such orderings. I'd bring it up with them too, if you can ensure that your game launches fine with just one of the two mods but breaks when both are involved.

embeddedt commented 8 months ago

(ModernFix developer here)

I don't intentionally change the order of config loading (the ModernFix patch is a simple wrapper around the config event dispatcher that ensures the load & reload events don't fire concurrently, as most mods are not programmed to expect that). Also, I'm pretty sure that Forge generally dispatches config loads before load complete is fired, not the other way around. You can see this here in the order of mod loading states.

juliand665 commented 8 months ago

Interesting, thanks for the response! Given what you've said, it's weird that the issue only seems to occur in the presence of ModernFix, though I'll admit I've done no testing of my own yet.

embeddedt commented 8 months ago

I am not sure if the OP actually tested an instance with just ModernFix & this mod yet...

juliand665 commented 8 months ago

@Reshy can you try it with this version of the mod? It should fix the crash.

solcarrot-1.20.1-1.15.2.zip

YinHuansleep commented 2 months ago

你能用这个版本的模组试试吗?它应该修复崩溃。

solcarrot-1.20.1-1.15.2.zip

Can you check this error for me crash-2024-07-13_13.57.39-server.txt