Repository navigation
BuildableDataComponent Extensions - #13042
Absolutionism wants to merge 11 commits into
Conversation
Doc94
left a comment
There was a problem hiding this comment.
Hi, i think this need a few changes mostly for the unnecesary gradle thing and also names for the set, you can check #12938 for reference.
Also im not sure about all the set methods maybe in a few places can be like Enchantments where a static builder exists for that like
4b034e1 to
165da50
Compare
|
Rebased and include new components in the extension of BuildableDataComponent |
Based in how the component can come this just copy all the values directly.
…sm/dev/BuildableDataComponent-Extensions # Conflicts: # paper-api/src/main/java/io/papermc/paper/datacomponent/item/ItemComponentTypesBridge.java # paper-api/src/main/java/io/papermc/paper/datacomponent/item/KineticWeapon.java # paper-api/src/main/java/io/papermc/paper/datacomponent/item/MapItemColor.java # paper-api/src/main/java/io/papermc/paper/datacomponent/item/PiercingWeapon.java # paper-server/src/main/java/io/papermc/paper/datacomponent/item/ItemComponentTypesBridgesImpl.java # paper-server/src/main/java/io/papermc/paper/datacomponent/item/PaperConsumable.java
|
Ok try a few things for the pending TODO.... (a little help for generate a test... https://pastes.dev/lJDFvwLYzz) |
|
what about a itemStack.editData(DataComponentTypes.SOME_BUILDABLE_COMPONENT, builder -> builder.something(...)) |
|
If anyone wanna make another review for this in case still miss something? |
This PR aims to update
Componentclasses, that have aBuildersub-class, by extendingBuildableDataComponent, allowing users to retrieve a builder object with the same data from the component object.Additionally, adds setters for some builders, allowing to completely set data rather than just adding. In tandom with
#toBuilderallowing all other data to be kept without the need to recreate and setting each data 1 by 1.#13041