Open altrisi opened 10 months ago
Reviewed the changes and looks good to me
Also made a quick test for the client <-> server commucation in dev environment, all of version log, rule sync and scarpet rendering work fine
cross-mc-version test is not done tho, but I think it's ready to go
Thank you for your work. Unfortunately upon further investigation there should be no easy way of retaining backwards compatibility given the nature of nameless root nbt introduced in minecraft 1.20.2 update. This completely breaks root nbt compound cross version compatibility and there is no decent way around that. So we may as well take this opportunity to modernize carpet custom payload and keep it stable again in the newer versions.
Also a carpet custom payload packet translator across 1.20.2+ and 1.20.2- can be made without too much effort.
This adds back the unnecessary
command
int
toCarpetPayload
, to allow it to handle packets from servers running on older versions that are allowing newer clients with something like ViaVersion.That
int
was removed in commit cd572695b6.This also adds checks that
command
is alwaysDATA
, movesCarpetPayload
to its own class and adds a constructor withoutcommand
to it.Completely untested at the moment.