Skip to content
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

Fabric server cannot detect registered neoforge client channels #1913

Open
dima-dencep opened this issue Jan 24, 2025 · 1 comment
Open

Fabric server cannot detect registered neoforge client channels #1913

dima-dencep opened this issue Jan 24, 2025 · 1 comment
Assignees
Labels
1.21.1 Targeted at Minecraft 1.21.1 networking Related to networking

Comments

@dima-dencep
Copy link
Contributor

dima-dencep commented Jan 24, 2025

Minecraft Version: 1.21.1

NeoForge Version: 21.1.113

Description of issue:
For a long time I couldn't figure out why this code was unable to apply neoforge client mod config sent from fabric server

ServerConfigurationConnectionEvents.CONFIGURE.register((handler, server) -> {
    if (ServerConfigurationNetworking.canSend(handler, NetworkPlatformTools.EMOTE_CHANNEL_ID)) {
        handler.addTask(new ConfigTask());
    }
});

Then I added System.out.println(ServerConfigurationNetworking.getSendable(handler)); before the if statement (links at the bottom show how channels are registered in fabric and neoforge) to compare fabric and neoforge output

There's some data when fabric client connects

[23:06:56] [Netty Server IO #1/INFO] (Minecraft) [STDOUT]: [c:version, fabric:accepted_attachments_v1, emotecraft:stream, c:register, fabric:custom_ingredient_sync, fabric:registry/sync/direct, emotecraft:emote]

But the output is empty when neoforge client performs a connection

[23:07:09] [Netty Server IO #4/INFO] (Minecraft) [STDOUT]: []

This is not just a config state issue. Sending neoforge client->fabric server packets works but fabric server->neoforge client doesn't.
I think this is a neoforge bug, since my hack for paper server works just fine with fabric but encounters the very same problem with neoforge client

Full code for fabric
Full code for neoforge

I'd be happy to answer any questions!

@dima-dencep dima-dencep added the triage Needs triaging and confirmation label Jan 24, 2025
@Shadows-of-Fire
Copy link
Contributor

Since it seems like you already have the environments available, it would probably be faster for you to self-investigate. Neo clients send the c:register payload (an instance of CommonRegisterPayload) when a c:register payload is received from the server here.

This might be a timing thing, so you'll need to debug the fabric side to see when they send c:register, when neo receives it, when neo sends the reply, and when fabric receives the reply, all w.r.t. your handling code there.

Though, this looks like you're looking for a channel during the configuration phase? Those should be included with the minecraft:register payload that gets sent at the start of the process (ref). You can debug what channels the neo client is reporting back to the server here

@Shadows-of-Fire Shadows-of-Fire added the 1.21.1 Targeted at Minecraft 1.21.1 label Jan 25, 2025
@Shadows-of-Fire Shadows-of-Fire self-assigned this Jan 25, 2025
@Shadows-of-Fire Shadows-of-Fire added networking Related to networking and removed triage Needs triaging and confirmation labels Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.1 Targeted at Minecraft 1.21.1 networking Related to networking
Projects
None yet
Development

No branches or pull requests

2 participants