CloudburstMC / Protocol

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

Fallback to UnknownPacket if deserialization failed #192

Closed hax0r31337 closed 1 year ago

hax0r31337 commented 1 year ago

This code allows full packet received by the server and prevent incomplete packets being forwarded to client when performing as a proxy.

should we fallback the packet to UnknownPacket if the packet still have bytes to read?

SupremeMortal commented 1 year ago

You could modify the packet codec in the pipeline to achieve the same thing.