Forgified Fabric API

Forgified Fabric API

13M Downloads

Error when a client join without Sinytra and ForgifiedFabricAPI

Ephilem opened this issue ยท 1 comments

commented

I would like to add a Fabric-only mod in a small Neoforge modpack for Minecraft 1.21.1. This mod works as server-only, where if you don't have this mod on the client, you can still connect to the server. And for those who have the mod installed on their client, they can use the functionality provided by the mod.

It works perfectly for those who want to use the mod, but for people who don't want to use it, they get an error on their client when joining the server:
[Render thread/WARN] [minecraft/ClientCommonPacketListenerImpl]: Client disconnected with reason: The server sent registries with unknown keys: ResourceKey[neoforge:ingredient_serializer / fabric_recipe_api_v1:fabric_wrapper]

Here are some test cases:

Case 1

Server: Neoforge, Axiom, Sinytra, ForgifiedFabricApi
Client: Neoforge
Result: Error on join for the client

Case 2

Server: Fabric, FabricApi, Axiom
Client: Neoforge
Result: Working perfectly (and if the client has Axiom, they can use it)

Case 3

Server: Neoforge, Sinytra, ForgifiedFabricApi
Client: Neoforge
Result: Error on join for the client

Tested with :
Minecraft : 1.21.1
Neoforge Client : 21.1.139
Sinytra Version : 2.0.0-beta7
Forgified Fabric API : 0.107.0+2.0.25
Axiom : 4.6.2

commented

This happens due to our custom ingredient serializer that wraps fabric ingredients not being present on clients. I've investigated the issue and found out NeoForge does not allow registering optional registry entries. Unfortunately, there is not much we can do about this.

I'd also like to point out that Vanilla clients will work just fine when connecting to servers. The issue only occurs once NeoForge is installed on the client, as the connection type changes, and registry sync will be required.