Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CraftMetaBlockState for data components #10731

Merged
merged 1 commit into from
May 25, 2024

Conversation

Machine-Maker
Copy link
Member

@Machine-Maker Machine-Maker commented May 16, 2024

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 #10697.


Download the paperclip jar for this pull request: paper-10731.zip

@Machine-Maker
Copy link
Member Author

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 Machine-Maker marked this pull request as draft May 18, 2024 00:03
@Machine-Maker Machine-Maker changed the title Properly apply the built patch from ItemMeta Fix CraftMetaBlockState for data components May 19, 2024
@Machine-Maker Machine-Maker marked this pull request as ready for review May 19, 2024 23:55
@Machine-Maker
Copy link
Member Author

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 Machine-Maker force-pushed the fix/ItemMeta-AGAIN branch 2 times, most recently from 029a960 to 575451b Compare May 21, 2024 21:38
@kennytv kennytv added the priority: high This issue is either a gamebreaking bug or crash and needs to be addressed soon. label May 23, 2024
@Machine-Maker Machine-Maker force-pushed the fix/ItemMeta-AGAIN branch 2 times, most recently from d0fe354 to 878c55a Compare May 25, 2024 23:05
@Machine-Maker Machine-Maker merged commit 26e90b9 into PaperMC:master May 25, 2024
3 checks passed
@Machine-Maker Machine-Maker deleted the fix/ItemMeta-AGAIN branch May 25, 2024 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-pr-jar Enables a workflow to build Paperclip jars on the pull request. priority: high This issue is either a gamebreaking bug or crash and needs to be addressed soon.
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

Some items with empty attribute list receive additional data after interacting with them in the inventory
4 participants