retrooper / packetevents

Precision meets performance—a powerful tool for mastering Minecraft packet manipulation with speed and finesse.
GNU General Public License v3.0
540 stars 152 forks source link

Server resource packet hash doesn't get received and sent by the client? #791

Closed DemonDxv closed 5 months ago

DemonDxv commented 5 months ago

Describe the bug When the server sends out a WrapperPlayServerResourcePackSend on 1.8.9 the client doesn't send the hash that the server sent with it. The length of the string is always 0.

Software brand Spigot 1.8.8-R0.1-SNAPSHOT (/about)

Plugins ViaVersion, Spark, WorldGuard, Citizens, Strikepractice, PacketEvents, Essentials

How To Reproduce Steps to reproduce the behavior:

  1. Send a resource packet out like this every so often or on a command.

PacketEvents.getAPI().getPlayerManager().sendPacket(player, new WrapperPlayServerResourcePackSend( "level://" + "test" + "/resources.zip", "test", false, null));

  1. Listen for the resource packet for the client, grab and debug the hash string from the packet it returns a 0 length string (PacketType.Play.Client.RESOURCE_PACK_STATUS)

Expected behavior The client should give the hash that's provided when the server sends out the packet.

Screenshots https://i.imgur.com/JAvTB6F.png https://i.imgur.com/FzsHVaF.png

retrooper commented 5 months ago

On versions older than 1.10 (which happens to be your case), packetevents does recognize and write/read the hash within the packets. It could be that ViaVersion is modifying the packet and emptying the hash, causing you to experience this.

FYI: Versions 1.10+ have removed this hash.

Take away: Try without ViaVersion and see if it persists, inform us and maybe consider consulting with them.

DemonDxv commented 5 months ago

On versions older than 1.10 (which happens to be your case), packetevents does recognize and write/read the hash within the packets. It could be that ViaVersion is modifying the packet and emptying the hash, causing you to experience this.

FYI: Versions 1.10+ have removed this hash.

Take away: Try without ViaVersion and see if it persists, inform us and maybe consider consulting with them.

Edit:

So when using Velocity to connect to a server, that uses PacketEvents (on the spigot) it has this hash issue. If its not Velocity it doesn't have the issue (I made report to them: https://github.com/PaperMC/Velocity/issues/1327)