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

Allow NetworkCallbacks::login access to sending/receiving packets #508

Open
natanalt opened this issue Aug 30, 2023 · 3 comments
Open

Allow NetworkCallbacks::login access to sending/receiving packets #508

natanalt opened this issue Aug 30, 2023 · 3 comments
Labels
enhancement New feature or request low priority Other issues are more important

Comments

@natanalt
Copy link
Contributor

Describe the problem related to your feature request.

It would be nice if NetworkCallbacks::login implementors could send/receive LoginQueryRequestS2c/LoginQueryResponseC2s packets to allow dealing with clientside mods and whatever else

What solution would you like?

The login callback could receive a reference to PacketIo as a parameter. The struct could also have a convenience function for both sending a query and awaiting a response from the client (according to wiki.vg at least it's always supposed to send one back)

What alternative(s) have you considered?

Outside of modifying/replacing default Valence crates, none

Additional context

-

@natanalt natanalt added the enhancement New feature or request label Aug 30, 2023
@dyc3
Copy link
Collaborator

dyc3 commented Aug 30, 2023

Are there mods that actually do this? Do you have any use case examples? Just curious

@natanalt
Copy link
Contributor Author

wiki.vg's article on Packet Channels lists a few mod examples, but I don't know how up to date they are, or how many of them are supposed to be done during Login state. It's also used by Velocity, and that's where valence_network uses those packets itself. Otherwise I'm actually not really familiar with that

@dyc3
Copy link
Collaborator

dyc3 commented Aug 30, 2023

We already have support for velocity built in, but I suppose it would be better to make it extendable by users. Let's have this be low priority for now.

@dyc3 dyc3 added the low priority Other issues are more important label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority Other issues are more important
Projects
None yet
Development

No branches or pull requests

2 participants