fix: 1.21.9 and 1.21.11 adapters throw invalid bit count when calling unpack #3431
+46
−48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Pasting clipboards in some chunks throw a validation error when calling "unpack":
Description
On the Bakery network we had someone find an issue where specific chunks cannot be pasted into, in this case chunk -764,798 (but there were others, i.e -769 798), and it throws the error above. Restarts does not fix it, but it happened after updating to 1.21.10. All our servers are all on 1.21.10, we saw this same error when using FAWE
FastAsyncWorldEdit-Paper-2.14.1-SNAPSHOT-1197.jarwhich used thev1_21_9adapter, and when usingFastAsyncWorldEdit-Paper-2.15.0.jarwhich used thev1_21_11adapter.Tried various approaches to fix
unpack():So the solution proposed here is to replace the
PalettedContainer.unpack()call with manual population, which does require 4096 individualsetcalls instead of bulk palette creation.I am not sure if this is the correct change to make or not. I've tested extensively and it fixes the error mentioned above.
Submitter Checklist
@since TODO.