PaperMC / Velocity

The modern, next-generation Minecraft server proxy.
https://papermc.io/software/velocity
GNU General Public License v3.0
1.68k stars 583 forks source link

Issue plugin PacketEvents 2.0 & Velocity (missing packet information) #1327

Closed DemonDxv closed 1 month ago

DemonDxv commented 1 month ago

I reported the issue to PacketEvents but also thought it would be appropriate to report it here too. (https://github.com/retrooper/packetevents/issues/791)

The issue occurs when the server attempts to send out a resource status packet (url being "level://test/resources.zip" and the hash being "test") when doing this on a normal spigot the client packet sends back the packet the hash id that the server sent (this is deprecated in 1.10+ version but not older version such as 1.9, 1.8, and 1.7) In my testing, when connecting through Velocity, the packet gets sent by the server but the clients hash id somewhere along the lines gets lost, and doesn't send out anything other than an empty string.

Steps to produce.

  1. Make a spigot server with PacketEvents 2.0 (spigot 1.8.8)
  2. Make a plugin which utilizes PacketEvents 2.0 and sends out the packet like so, and then listen for the packet from the client and display the hash value provided by the wrapped packet. (PacketType.Play.Client.RESOURCE_PACK_STATUS) PacketEvents.getAPI().getPlayerManager().sendPacket(player, new WrapperPlayServerResourcePackSend( "level://" + "test" + "/resources.zip", "test", false, null));
  3. Make a Velocity Server that connects to the spigot server.
  4. Connect and it will have 0 data for the hash id from server.

Without Velocity the issue doesn't occur, the issue seems to be Velocity related only.

(if you need more information let me know)

electronicboy commented 1 month ago

I don't think that we have any commitment to sending obviously malformed packets to the client even if it may or may not be happy to just ignore the fact that the data is invalid