-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
SpongeForge for Minecraft 1.20.6 #4006
Conversation
@Inject(method = "tick", at = @At("HEAD")) | ||
private void impl$onTick(final CallbackInfo ci) { | ||
// In SpongeVanilla we do channel registration during this state, not sure if we need to do anything in SpongeForge | ||
if (this.state == ServerLoginPacketListenerImpl.State.NEGOTIATING) { |
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.
Why does this change exist?
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.
See https://github.com/SpongePowered/Sponge/blob/api11/forge/src/mixins/java/org/spongepowered/common/mixin/core/server/network/ServerLoginPacketListenerImplMixin.java#L146
and https://github.com/SpongePowered/Sponge/blob/api11/forge/vanilla/src/mixins/java/org/spongepowered/vanilla/mixin/core/server/network/ServerLoginPacketListenerImplMixin_Vanilla.java#L80
After auth, we switch to state NEGOTIATING
which is unused by vanilla MC. We use this state in SpongeVanilla to register channels and then we go to VERIFYING
which will be handled by vanilla MC.
I had to replicate the NEGOTIATING
-> VERIFYING
switch in SpongeForge otherwise the login stay forever in state NEGOTIATING
.
src/mixins/java/org/spongepowered/common/mixin/core/network/ConnectionMixin.java
Outdated
Show resolved
Hide resolved
46b82ea
to
3687b9d
Compare
No description provided.