CloudburstMC / Protocol

A protocol library for Minecraft Bedrock Edition
https://git.io/ProtocolLib
Apache License 2.0
312 stars 95 forks source link

getFormData() from ModalFormResponsePacket returns corrupted/empty data #167

Closed Pugmatt closed 2 years ago

Pugmatt commented 2 years ago

Currently updating the BedrockConnect project to Protocol version 2.9.11-SNAPSHOT.

Calling the function getFormData() from a ModalFormResponsePacket object seems to be returning empty or corrupted data. (In the context of a button being pressed in a form UI) When printing the contents of getFormData(), it seems to be empty or a random character like "☻".

Use-case/Line in question from project:

https://github.com/Pugmatt/BedrockConnect/blob/master/serverlist-server/src/main/com/pyratron/pugmatt/bedrockconnect/listeners/PacketHandler.java#L100

Not sure if it's just a silly mistake from my end, but I'm guessing the packet might just be getting decoded incorrectly due to a change in the packet's data layout this update.