Paper
Paper copied to clipboard
Fix CraftMetaBlockState for data components
This will go on forever...
Upstream's "restorePatch" function doesn't actually apply the patch which will compare the patch values to the itemtype's implicit values and not include the component if they equal. This fixes https://github.com/PaperMC/Paper/issues/10697.
Download the paperclip jar for this pull request: paper-10731.zip
I found some more issues related to the beehive thing. the fix for that in this PR currently isn't correct and only fixes one instance of it. Fixing all of them will require more diff so am going back to draft until I get that done.
Ok, I think this is now the most correct fix for block entities and itemmeta. Instead of storing the data in a CraftBlockEntityState which will add a bunch of extra stuff, this changes it to 2 fields for the custom data and the rest of the components that apply to the specific block entity type.