dmulloy2 / ProtocolLib

Provides read and write access to the Minecraft protocol with Bukkit.
GNU General Public License v2.0
1.04k stars 257 forks source link

PacketType.Play.Server.PLAYER_INFO_REMOVE is associated to PacketPlayOutRecipes #3306

Open diogotcorreia opened 1 week ago

diogotcorreia commented 1 week ago

Describe the bug Seems like PacketType.Play.Server.PLAYER_INFO_REMOVE is being associated with PacketPlayOutRecipes on 1.20.4, making packet handlers throw exceptions since they start handling packets they are not supposed to.

Sample log: https://pastebin.com/EErzajTU

To Reproduce Steps to reproduce the behavior:

  1. Place ProtocolLib b736 on a Paper 1.20.4 server
  2. Check the class of PacketType.Play.Server.PLAYER_INFO_REMOVE (using a debugger)

Expected behavior PacketTypes should have the correct classes associated with them.

Screenshots Screenshot of IntelliJ's debugger

Version Info https://pastebin.com/qKvqcADh

Additional context I have validated that this is caused by commit 6845acd89d98986f4951a84c63ff9b878d2651ae (build 734) - the 1.21.3 update.

This does not happen with 1.20.6 or above (presumably because the way the packet registry is constructed changes in that version)