Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Fix CraftMetaBlockState for data components

Open Machine-Maker opened this issue 1 year ago • 2 comments

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

Machine-Maker avatar May 16 '24 00:05 Machine-Maker

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.

Machine-Maker avatar May 18 '24 00:05 Machine-Maker

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.

Machine-Maker avatar May 19 '24 23:05 Machine-Maker