fantahund / VoxelMap

24 stars 6 forks source link

Fix world_id packet handling #4

Closed turikhay closed 2 years ago

turikhay commented 2 years ago

This should now work with any server implementation of world_id channel

Brokkonaut commented 2 years ago

Hi, I would like to have 2 changes to this pr:

For the received packets: Currently it is not required to send a 42 at all, and not all server implementations send that (some just send a 0). So i would recommend the following for legacy compatibility:

So it should accept all fixed packets and the old ones if the world name does not have 42 bytes (and as that is a quite long name, it should probably not happen)

For the sent packets: Here it should be fine if just the "fixed" packet is sent, because most implementations ignore the content anyways.