Fix resource pack UUID serialization causing server kick on 1.21+#3842
Fix resource pack UUID serialization causing server kick on 1.21+#3842
Conversation
Co-authored-by: extremeheat <13713600+extremeheat@users.noreply.github.com>
|
everything is cool |
lib/plugins/resource_pack.js
Outdated
There was a problem hiding this comment.
Removed the branch — denyResourcePack now unconditionally writes a single packet with uuid included. Done in 708fd6f.
| } | ||
| }) | ||
|
|
||
| function acceptResourcePack () { |
There was a problem hiding this comment.
These branches are also unnecessary
There was a problem hiding this comment.
Removed all feature branching from acceptResourcePack — it now always writes both packets with uuid and hash fields unconditionally (protodef drops fields not in the version's schema). Done in 708fd6f.
|
@copilot since protodef will ignore extraneous fields for versions that don't have them, the feature branching is unnecessary. Feature branching is only needed for fields that have different non-null data types between different versions; using different field names removes this need. You can remove them where applicable for cleanliness (sometimes it's helpful to have comments aside fields to notate what version the field applies to) |
…branching Co-authored-by: extremeheat <13713600+extremeheat@users.noreply.github.com>
Done in 708fd6f. Removed all feature branching from |
latestUUIDstorage: store raw bytes (data.uuid) not UUID object, in bothadd_resource_packandresource_pack_sendhandlersdenyResourcePackdouble-write bugacceptResourcePackanddenyResourcePack— protodef ignores extraneous fields so version checks are unnecessarylatestUUIDandlatestHashassignments outside the if/else inresource_pack_sendso both are always storedOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.