-
Notifications
You must be signed in to change notification settings - Fork 423
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
Configuration networking fixes #3832
Conversation
Please refer to ae314ad , we have to wait for initial acceptable channels from server, so |
.../client/java/net/fabricmc/fabric/impl/networking/client/ClientConfigurationNetworkAddon.java
Show resolved
Hide resolved
...c/client/java/net/fabricmc/fabric/mixin/networking/client/ClientPlayNetworkHandlerMixin.java
Outdated
Show resolved
Hide resolved
public void onServerReady() { | ||
ClientConfigurationConnectionEvents.START.invoker().onConfigurationStart(this.handler, this.client); | ||
} | ||
|
||
@Override | ||
protected void receiveRegistration(boolean register, RegistrationPayload payload) { | ||
super.receiveRegistration(register, payload); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration negotiation flow should be like this, imo:
S2C: LoginSuccessS2CPacket
C2S: EnterConfigurationC2SPacket
S2C: sendInitialChannelRegistrationPacket
S2C: Ping
S: fire ServerConfigurationConnectionEvents.BEFORE_CONFIGURE
C2S: receive initial channels, send back client side channels, fire START event here because we must wait for server initial channels
C2S: Pong
S: receive initial channels, fire ServerConfigurationConnectionEvents.CONFIGURE
so onServerReady() should be called here (in the if block) as we received the initial channels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree ill make these changes. It should also be fired even when connecting to a vanilla server (thus when no channels are recieved)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated this to now also trigger the event it if the brand packet is recieved.
.../fabricmc/fabric/test/networking/client/configuration/NetworkingConfigurationClientTest.java
Outdated
Show resolved
Hide resolved
…abric/test/networking/client/configuration/NetworkingConfigurationClientTest.java Co-authored-by: Octol1ttle <[email protected]>
* Configuration networking fixes * Review fixes. * Update fabric-networking-api-v1/src/testmodClient/java/net/fabricmc/fabric/test/networking/client/configuration/NetworkingConfigurationClientTest.java Co-authored-by: Octol1ttle <[email protected]> --------- Co-authored-by: Octol1ttle <[email protected]> (cherry picked from commit 686dcdc)
ClientConfigurationConnectionEvents.READY
as it was incorrectly named, replaced withCOMPLETE
ClientConfigurationConnectionEvents.START
, this is fired when the server is ready to recieve configuration packets. During login and reconfigureThis should be backported to 1.20.6
Closes #3830
Closes #3821