Cuberite Forum
Multi-version support - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Discussion (https://forum.cuberite.org/forum-5.html)
+--- Thread: Multi-version support (/thread-606.html)

Pages: 1 2


Multi-version support - xoft - 10-26-2012

If I read correctly, the 1.4 version of Minecraft has the ability to detect server version and will refuse to connect to an older a different version. This makes it somewhat difficult for us regarding our multi-version support. These solutions come to mind, without much thinking them through. Let's discuss Smile

(A) We drop multi-version support altogether. We keep the architecture, because it makes version transitions easier, but we don't use it to support multiple protocols

(B) We let the server admin specify which version they want supported through an ini file, that version will be reported to the client. Multi-version support will be there in the background, but effectively will not be used other thanthat.

© We let the server admin specify multiple server ports and versions on each port. One single port will have one version, but there can be more versions supported simultaneously on different ports.

So Mojang decided that they want the players to need to be aware of the technical stuff, connecting to different ports etc., instead of the server working on the details and deciding about the support. NiceTongue


RE: Multi-version support - Luksor - 10-26-2012

(D) Take client's version from the handshake and send it back to him as the server version to enable the client to connect. Smile

Still, I think that multi-version support should be removed in the future. It will bring tons of bugs as more features will be added.
New blocks or mobs will crash older clients, and there can be more advanced changes than that. Not just some packets in the protocol. I don't think it's worth the effort.


RE: Multi-version support - ThuGie - 10-26-2012

I would go fror dropping it, even though its nice to have.
In the long run wouldnt it become a mess to keep it up ?


RE: Multi-version support - xoft - 10-26-2012

It will be a mess to drop, actually, because someone would need to go through all versions and decide if their code is needed for the newer version or not (thanks to C++ inheritance, the 1.3.2 protocol actually uses the 1.2.5 protocol's functions for the packets that didn't change). And as I've already written, it makes for an easier transition between two protocol versions - you can have both protocols enabled and only advanced users / testers try out the new protocol and report bugs, while others can keep working on other stuff.
(10-26-2012, 05:35 AM)Luksor Wrote: (D) Take client's version from the handshake and send it back to him as the server version to enable the client to connect. Smile

If that is possible, it will be the best solution. But I'm afraid the server version is reported in the protocol sooner than a handshake (I suspect the "0xff server ping" packet will have the info, which is sent without the handshake)


RE: Multi-version support - Luksor - 10-26-2012

Hahaha! A little bug i just found:
If you want to connect to an older server using 1.4 client select the server you want to connect to, click "direct connect" then "cancel" and finally "join server". EnjoyBig Grin

EDIT: Another solution (at least to when Minecraft 1.5 will be out): Make server send his version as 1.4, older clients will probably ignore it and connect anyway and 1.4 client will be able to connect too without using any tricks.Tongue


RE: Multi-version support - ThuGie - 10-26-2012

Just wondering though.
If you send the server is a 1.4
How do old clients respond as they shouldnt deny access right ?


RE: Multi-version support - xoft - 10-26-2012

The first problem is that the first packet that the client sends has changed between the versions:
http://wiki.vg/Pre-release_protocol#Server_List_Ping_.280xFE.29
The list ping packet used to be a single byte (packet type), now it's two bytes; but the server doesn't know, if it receives a single byte, if it should wait or not for another byte to come.

The second problem is that if the server sent a 1.4 version, the <=1.3.2 clients would display garbled server name instead of "MCServer - in C++, 0/100 players".
The poll results are really nice right now Smile 33%, 33%, 33%, one person for each option.


RE: Multi-version support - Luksor - 10-26-2012

Oh. So now I'm opting for (A) then.Tongue


RE: Multi-version support - FakeTruth - 10-26-2012

Mojang must hate MCServer :p


RE: Multi-version support - xoft - 11-09-2012

In the end, multi-protocol support stays in and the server admin decides, which protocol version MCServer reports to the clients, using settings.ini: [Server].PrimaryServerVersion
I've added a detailed description to the wiki, hopefully it's clear enough. http://www.mc-server.org/wiki/doku.php?id=configure:settings.ini&#server_section