Add BlockStateMeta#clearBlockState#10160
Merged
Owen1212055 merged 2 commits intoJan 23, 2024
Merged
Conversation
Contributor
|
Not sure how big of a PR do you want to make this/maybe split it up into multiple, but as mentioned in the original issue there's a few other places with a similar problem:
Either way thank you very much for adding this! |
Member
|
All those 3 boil down into the fundamental flaw of ItemMeta, which is why the property API is coming to be a thing |
electronicboy
approved these changes
Jan 12, 2024
Member
Author
|
Yeah, I agree with @electronicboy here. Those point to specific properties that can be reset. The property API is the way to handle that. Other similar clear methods pertain to whole groups of data, like PotionMeta#clearCustomEffects, FireworkMeta#clearEffects, and more, all exist and I think this falls into that category. |
0780648 to
a77fac6
Compare
Owen1212055
approved these changes
Jan 23, 2024
a77fac6 to
e4fb1a9
Compare
lynxplay
pushed a commit
to lynxplay/paper
that referenced
this pull request
Feb 23, 2024
LeonTG
pushed a commit
to LeonTG/Paper
that referenced
this pull request
May 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #10159
An alternative would be to make
BlockStateMeta#setBlockStatenullable. I don't know if we want to make that change, especially since the interface is already setup so the getter is nonnull and there is ahasboolean method.