Carpet

Carpet

2M Downloads

[Internals Suggestion] Use a ProtocolVersion number instead of Carpet's version

altrisi opened this issue ยท 1 comments

commented

Currently, the Carpet Protocol (for sending rules, Scarpet shapes and tick speed) passes the Carpet version to check if the client and server are compatible. That throws warnings if the version isn't explicitly the same, but protocol compatible, instead of fully allowing the client, and would fail in unknown (?) ways if they are actually incompatible.

I suggest instead using a ProtocolVersion (or CarpetProtocolVersion if desired), that would start at 1 and would increase when new things or breaking changes are added to the Protocol, but not when other regular Carpet stuff changes.

That would allow actual compatibility checking (and disable integration if incompatible) and would also allow to provide compatibility with older protocols (if desired) when checking the protocol version.

If done, would probably be better suited to the 1.17 branch to prevent having to add a check for legacy version strings, since those aren't compatible with these versions (except maybe with mods that allow to connect to older servers).

commented

makes sense.