Skip to content

Fixed PING packet for 1.19.1 and 1.19.2#2518

Merged
dmulloy2 merged 1 commit intodmulloy2:masterfrom
Fanfaryy:fixed_clientboundpingpacket
Aug 26, 2023
Merged

Fixed PING packet for 1.19.1 and 1.19.2#2518
dmulloy2 merged 1 commit intodmulloy2:masterfrom
Fanfaryy:fixed_clientboundpingpacket

Conversation

@Fanfaryy
Copy link
Copy Markdown
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
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.

2 participants