quilt-loader icon indicating copy to clipboard operation
quilt-loader copied to clipboard

Mods not loaded due to environment type aren't handled gracefully

Open TheEpicBlock opened this issue 3 years ago • 2 comments

The loader simply refuses to load mods in the wrong environment. This means it doesn't interact at all with the mod dependency system. An easy way to reproduce would be to have a regular mod depend on a serversided library. As the serversided library isn't removed whilst mods are resolved the regular mod is loaded without any errors. This also causes an issue for jij'd mods.

A simple fix would be to filter out mods in the wrong environment before the mods are resolved, although something providing nicer errors might be better.

TheEpicBlock avatar May 23 '22 19:05 TheEpicBlock

have a regular mod depend on a serversided library

What do you want this to do? If the regular mod needs the serversided library, then isn't it just a serversided mod? The alternative (and what it currently means) is that the library is only required if you are on the server.

Obviously this isn't ideal - and ideally we'd add a field (like "environment": "dedicated_server") to the dependency json object instead, so you could declare the sidedness explicitly. The problem with doing that (and making sidedness take part in mod resolution) is this immediately breaks any mod that's using the current behaviour.

AlexIIL avatar May 23 '22 21:05 AlexIIL

I would've expected the dependency to be enforced regardless. Putting a library in the depends list means that your mod doesn't function without that library, I wouldn't expect the environment field to be an exception to this. Although, in hindsight the mod should really be marked as serverside if it depends on a serverside lib, so I guess this isn't that much of a problem.

TheEpicBlock avatar May 24 '22 19:05 TheEpicBlock