Fabric API

Fabric API

108M Downloads

Misleading "Registry remapping" error

youmukonpaku1337 opened this issue ยท 19 comments

commented

unknown-3
When a server has some specific mods but the client doesn't, fabric shows a confusing registry remapping error with a few IDs.
Forge, on the other hand shows a missing mods error, would it be possible to implement that in fabric? It's causing me to lose a lot of potential new members, because for some reason nobody reads the description and decides to join anyway, and then sees the error and just leaves.

It could look something like that:
"You're missing mods, please install Fabric and the Fabric API and add these mods:
list
of
mods
goes
here"

By the way, is this an issue with the API or the loader? I'm not sure so i made the issue here, please tell me if the issue should be moved to the fabric modloader issues page

There are also other variations of the error, like:
unknown-4

commented

as you can see, a normal vanilla player might not understand what is happening when they get that error

commented

This is an API issue.

However, there is one slight problem; the client does not know what mod provides the registry, so we need to make the server send the mod info in addition to the registry. This can increase the size of the packet, which is already an issue.

Even if we do fix that, there will be another problem - that the server doesn't know what mod added what. Fabric uses the vanilla registry, so nothing can tell us what mod added to what, without hacky solutions like examining stack trace every time registry is modified.

commented

just wondering, why can't 2 packets be sent? also, i have no idea what a registry is

commented

maybe at least make it show something like
"You're missing some mods, please install Fabric and the Fabric API and check the server description/website on which mods have to be installed"

commented

Okay, let's clarify what a registry is.

Almost all ingame things like blocks, items, entities, biomes, etc are registered in a "registry". In most cases the contents of the registry are static (e.g. in vanilla, the client and the server have the same blocks), but this might not be true in modded situations. Registry Sync ensures that the client has everything the server needs in the registry.

Fabric mods use vanilla game's methods to add registry entries, which makes tracking which registry entry belongs to which mod hard, if not impossible. This is I believe the main difference between Forge.

That said, nothing prevents us from sending a list of mods independently, as you said. This should be opt-in (usually a waste of time), but listing that in the error, perhaps with a diff, might be enough.

commented

that wouldn't require making the packet bigger, or maybe make it opt-in?

commented

Yeah, we can improve it. (Note that if "Registry remapping failed" error is displayed the client should have Fabric and API at that point. We can't do much about those without Fabric/Fabric API, they'll just error and the server does not know why.)

commented

oh, i see

commented

guess ill have to put the fact that you need fabric and the api in the motd

commented

wait, just wondering, doesn't forge show the missing mods error to vanilla too?

commented

wait, just wondering, doesn't forge show the missing mods error to vanilla too?

Probably, but forge just detects that the client is vanilla and gives an error. Vanilla doesn't send mods (it doesn't even know about them) forge just knows the mods aren't loaded since forge isn't

commented

wait, just wondering, doesn't forge show the missing mods error to vanilla too?

Probably, but forge just detects that the client is vanilla and gives an error. Vanilla doesn't send mods (it doesn't even know about them) forge just knows the mods aren't loaded since forge isn't

so maybe make it show that fabric is missing on vanilla?

commented

and that some mods are missing on fabric itself, with modlist as opt-in

commented

yes, that'll do

commented

As a "temporary" solution, would it make sense to simply adjust the warning as follows? The modids would just be the namespaces for the erroring entries.

"Missing content from the following mods: modid1, modid2, modid3. Make sure that they are installed, with a version compatible with the one on the server. This can also be caused by pack version mismatches.

<technical error below, or even in the logs>"

commented

wait, we can use the same thing as what this uses to get what item comes from which mod https://modrinth.com/mod/shoutout

commented

It just looks up the mod name using the namespace of the item id as a mod id. The problem is that not all mods support it; some use a different namespace from their id

commented

oh, then how can i solve that?

commented

The message was improved in #3004.