Skip to content
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

PC protocol updates and refactor #948

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

extremeheat
Copy link
Member

@extremeheat extremeheat commented Dec 5, 2024

Fix PrismarineJS/node-minecraft-protocol#1350

TODO

@rom1504
Copy link
Member

rom1504 commented Dec 12, 2024

We have protodef in now
Next finish that and nmp

@rom1504
Copy link
Member

rom1504 commented Jan 4, 2025

@extremeheat
Copy link
Member Author

If anyone wants to help contribute the process here is not hard. Just need to backwards diff all the versions's proto.yml files and apply any missing fixes to the old version.

Click . in the GitHub page for the branch to open vscode and find 1.11/proto.yml and compare with 1.10/proto.yml (right click a file and do "select for compare..." and "compare with selected), then make fixes

Context- many times when updating the protocol people fix the data for the a new version (fix because the data was always wrong in mc-data, not that mc code changed) but they don't apply the changes to old versions. So this introduces the need to use features and pushes other ugly logic to everything else. Eg, 1.21 updates a packet, some things are changed to the structure unrelated to 1.21 but those structure changes aren't applied backwards so you need a new "feature" to use the packet now.

Also can use the opportunity to improve old definitions (eg using mappers instead of switching on changing numbers).

So to implement this in mineflayer/nmp/fs, we need to go through all the packet listens and writes one by one and check if it changed in this PR.

@extremeheat
Copy link
Member Author

master issue - https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/latest/proto.yml#L1557 is not consistent across states (config vs play state uses varint vs mapper)

@extremeheat extremeheat changed the title Pc protocol updates PC protocol updates and refactor Jan 7, 2025
@rom1504 rom1504 marked this pull request as ready for review January 11, 2025 18:36
@rom1504
Copy link
Member

rom1504 commented Jan 11, 2025

Idk how to mark back as draft

@extremeheat extremeheat marked this pull request as draft January 11, 2025 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.20.5 protocol errors / PartialReadError
2 participants