-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
The client and server mods loading order inconsistent #387
Comments
have any plan? |
Realistically this means doing one of the following:
Basically this needs us to add different load order algorithms. (In theory QSL could go in and sort entity serializer IDs, but that assumes you even use QSL) |
QSL does have an api for syncing these, but it does require the mods to use the api. There is effectively no way to sync the handlers without additional information, and there should be an warning printed to the log when this happens. |
The entity serializer IDs is just one of problems, and any code that uses mixin may face this problem. I think the problem is here. quilt-loader/src/main/java/org/quiltmc/loader/impl/QuiltLoaderImpl.java Lines 342 to 343 in a358422
When the size of the mod list is inconsistent, the seed will be different. |
Mod load order is undefined on fabric as well (and intentionally shuffled in dev), and that should not change. the solution is an API that avoids order-dependent problems, which quilt has, and fabric doesn’t. Fabric needs to get one (it’s one of the oldest issues on the repo), but in the meantime, mods need to avoid using the dangerous vanillla method. I have a mod that finds this dangerous behavior as well as a few others. I’ve reported most of the ones you listed already. |
The shuffled(although I don't know why need this) list not is a problem, the big problem is server side and client have a different load behaviors. If QSL maintains the same loading behavior on both side (even use filename order, like forge), the mod developers will found issues and fix issue (use some QSL API). The my problem is one of loading problems, even though I solved the problem by using the QSL API (still has register order problem, I don't know your how to solve it), the load problem still exists. |
A minimal changes suggestion, splite two mod list by (client only, server), use the same seed for shuffle. var clientModLists = modList.stream().filter(it -> is client only)...
var serverModLists = modList.stream().filter(it -> has server)...
int seed = serverModLists.stream().map(it -> it.id).toList().hasCode();
Collections.shuffle(serverModLists, new Random(seed));
Collections.shuffle(clientModLists, new Random(seed));
modList = serverModLists + clientModLists |
Exception
I found that the loading order of the Quilt loader on the server and client is different.
I know has some client mods do not exist on the server, but after excluding this mods, they are still in inconsistent order.
The client mods order: full client logs
The server mods order: full server logs
Why loading order is important?
The entity serializer relies heavily on loading order, when the loading order changes, the entity serializer id will be completely different.
The client entity serializers:
The Server entity serializers:
The entity serializer register entry:
The text was updated successfully, but these errors were encountered: