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

SpongeForge for Minecraft 1.20.6 #4006

Merged
merged 17 commits into from May 21, 2024
Merged

SpongeForge for Minecraft 1.20.6 #4006

merged 17 commits into from May 21, 2024

Conversation

Yeregorix
Copy link
Member

No description provided.

@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) {
Copy link
Member

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?

Copy link
Member Author

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.

@Yeregorix Yeregorix marked this pull request as draft May 19, 2024 20:02
@Yeregorix Yeregorix changed the title SpongeForge for Minecraft 1.20.4 SpongeForge for Minecraft 1.20.6 May 19, 2024
@Yeregorix Yeregorix force-pushed the api11/forge branch 2 times, most recently from 46b82ea to 3687b9d Compare May 20, 2024 13:13
@Yeregorix Yeregorix marked this pull request as ready for review May 20, 2024 19:56
@Yeregorix Yeregorix merged commit 973a2d1 into api-11 May 21, 2024
6 checks passed
@Yeregorix Yeregorix deleted the api11/forge branch May 21, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants