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

Rewrite PacketUtils #4748

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

Conversation

RacoonDog
Copy link
Contributor

Type of change

  • Bug fix
  • New feature

Description

Removes PacketUtilsUtils in favor of filling the PacketUtils maps using the new PlayStateFactories vanilla registry.
Instead of being identified by their yarn class names, the new packet names follow the following convention: namespace:Side/UpperCamelCaseName. The namespace minecraft is implicit, mapping vanilla packets will return a name fitting Side/UpperCamelCaseName, however you can still unmap vanilla packets with and without the namespace.

To match vanilla use cases, PacketUtils and PacketListSetting methods that used to take Class<? extends Packet<?>> parameters now take PacketType<? extends Packet<?>> instead.

Since we are effectively moving away from packets named with yarn mappings to official identifiers, this means that existing PacketListSetting saved configs will be reset, and some packets may appear under completely different names.

How Has This Been Tested?

Works greate

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

@Gamekind135

This comment was marked as off-topic.

@RacoonDog
Copy link
Contributor Author

can you update Tokyo to 1.21, Please

no and this is not the place to ask

@RacoonDog RacoonDog marked this pull request as draft July 24, 2024 00:03
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.

2 participants