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

Fixed PING packet for 1.19.1 and 1.19.2 #2518

Merged
merged 1 commit into from
Aug 26, 2023
Merged

Fixed PING packet for 1.19.1 and 1.19.2 #2518

merged 1 commit into from
Aug 26, 2023

Conversation

Fanfaryy
Copy link
Sponsor Contributor

  • This issue is not solved in a development build

Describe the bug
When using PacketType.Play.Server.PING on versions using protocol number 760 (1.19.1, 1.19.2) it uses ClientboundPlayerChatHeaderPacket instead of ClientboundPingPacket due to using the same currentId on PING and deprecated PLAYER_CHAT_HEADER.

To Reproduce
Steps to reproduce the behavior:

  1. Setup server on 1.19.1 or 1.19.2 version.
  2. Try to check the name and name of the class it is using like this:
System.out.println(PacketType.Play.Server.PING.toString());
System.out.println(PacketType.Play.Server.PLAYER_CHAT_HEADER.toString());
  1. See the mismatch in the console

Expected behavior
PacketType.Play.Server.PING should use ClientboundPingPacket.

Screenshots
Before changing currentId of PLAYER_CHAT_HEADER:
Screenshot 2023-08-24 221131

After changing currentId of PLAYER_CHAT_HEADER:
Screenshot 2023-08-24 221503

Version Info
Before changing currentId of PLAYER_CHAT_HEADER:
https://pastebin.com/HBC3FW6D

After changing currentId of PLAYER_CHAT_HEADER:
https://pastebin.com/dEc91hxq

Additional context
In other versions it seems to work fine, but 1.19.1 and 1.19.2 is problematic.

@dmulloy2 dmulloy2 enabled auto-merge (squash) August 26, 2023 20:58
@dmulloy2 dmulloy2 merged commit 2686c9f into dmulloy2:master Aug 26, 2023
3 checks passed
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

2 participants