-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for non-full packets #1278
Conversation
What does this actually do? |
It adds a client / server option to have |
What does that do? |
|
Where in the code are you seeing this and for what version? Do you have a link to code somewhere? |
This conversation is already well-documented at #811, except oddly I can't find MC version numbers. IIRC, >1.19.0 |
There is no such thing AFAIK of a partial packet. #811 is unrelated, that's caused by error in minecraft-data protocol, or invalid server data. |
Well then, this allows clients to handle invalid server data, and vice versa. I'll fully admit: I'm not particularly experienced with regards to the MC protocol or protobuf in general. But what I do know is that there was a server that vanilla MC clients were able to connect to and that node-minecraft-protocol (and by extension, mineflayer) clients were not able to connect to, and it was because of that particular check. When decoding the extra data, it didn't look like invalid data. In fact, it looked like extra data that belonged in the packet. At the very least, this config option allows us users to connect to such servers and submit more upstream PRs to node-minecraft-protocol to fix issues associated with these unusual configurations. The point of |
I think you misunderstood my last comment. This PR implies there is a thing as a partial packet, like one that has variable length. Or something to do with packet batching. As far as I am aware, this does not exist. Actually I think this seems like a dupe PR of #1094, what's changed here ? As for #811, you are looking at two different errors. The deserializer (in node-minecraft-protocol) is failing to read something (not fatal) and the serializer is incorrectly encoding something that is being sent to a vanilla client, causing it to crash (which is fatal). These are two independent errors, and like I mention, caused by legitimate error in data from outside or a wrong definition in minecraft-data |
#1094 and this PR share a git branch, which is why their files are synced. #1094 was closed when 7da26b4 was the latest commit. It fully disabled the This PR adds an option to disable them instead of having it disabled 100% of the time. I'll look at #811 again. It's been half a year since I last touched this stuff. |
Never mind. I can't find the code that reproduces the error. Closing unless I can repro again. |
I'm currently facing this issue: mineflayer -> ZenithProxy -> 2b2t (but I guess the destination server doesn't matter) I just check some blocks: |
Those errors are caused by bad/missing packet definitions in minecraft-data, or illegal packets being sent by the server. This PR wanted to just remove sanity checks which is not good (does not fix anything) |
Correction: this PR added an option that would manually disable the sanity checks for debugging purposes. I'm not suggesting this option should ever be used in a user-facing application, but for debugging it'd be helpful for the client to at least try to parse the data. |
The current code https://github.com/Pandapip1/node-minecraft-protocol/blob/master/src/transforms/serializer.js#L5 is always using FullPacketParser and hence always parses partial packets if possible So the only only thing this PR would have done is add an option to not parse partial packets and instead crash. |
CC #811, #1094
Currently, this project seems extraordinarily dead, in that it isn't being updated.
Admittedly, this PR is a band-aid and not a fix. But I'd rather have the option for hacky non-0% support than forced 0% support, when it comes to any recent version of the game.