BlockProperty API#11963
Open
Machine-Maker wants to merge 1 commit into
Open
Conversation
Member
8a98b51 to
cbe03ad
Compare
fc43a4b to
df9d795
Compare
Member
Author
|
Rebased for 1.21.6 |
Member
Author
|
@Lulu13022002 probably should figure out how to generate this stuff |
df9d795 to
6a1cd3d
Compare
86cf4a1 to
259edb3
Compare
259edb3 to
36a1faf
Compare
36a1faf to
c99815f
Compare
c99815f to
facd94b
Compare
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.
Replaces #7223
My take on how to add a "get block data properties individually" on top of bukkit's existing method-based system.
Structure
3 types of data properties:
Boolean,Integer, andEnum. This pr creates a baseBlockPropertyclass with 3 (+ special cases) implementations of it for each type.Special Cases
So far, I've noticed 2 API types that are used to wrap integers, so this also adds handling for those, not exposing them as integers.
rotationas BlockFacenoteas NoteThe
BlockPropertyHolderinterface contains all the methods to interact with a set of properties. I left it as a standalone interface in case other uses in the future popup where a separate impl might be warranted. I added aMutablesubinterface to that to separate out the "set" methods, some implementations of it might not want to support mutating properties (such as future FluidState API #8609).