C4K3 / ozelot

Rust library for handling all MCMODERN networking
Creative Commons Zero v1.0 Universal
34 stars 9 forks source link

Client login should wait for `LoginSuccess` #6

Closed NJAldwin closed 6 years ago

NJAldwin commented 6 years ago

I'm curious as to the reason that it currently waits for PlayerAbilities. From looking at wiki.vv and my testing with a vanilla server, LoginSuccess seems to be the best early packet to listen for. Otherwise, some essential packets (such as PlayerAbilities) are unavailable to clients.

I have a commit in my fork if you want an easy fix: NJAldwin/ozelot@479c29c3adfd95683daf75058b95368db85d639d

C4K3 commented 6 years ago

I don't remember why that is.

Looking at the docs it might be because PlayerAbilities comes at the end of a bunch of packets sent to the client, and I was not interested in those.

If returning control on receival of LoginSuccess works then let's do that.

C4K3 commented 6 years ago

I went ahead and added your linked commit.

b4993b00cfd598a12d7c48020b28abc8912f7072