-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Data Components #10613
Data Components #10613
Conversation
return result; | ||
} | ||
|
||
+ // Paper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ // Paper | |
+ // Paper start |
+ | ||
+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ | |
+ |
public enum Material implements Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper | ||
//<editor-fold desc="Materials" defaultstate="collapsed"> | ||
- AIR(9648, 0), | ||
+ AIR(9648, 64), // Paper - air techncially stacks to 64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ AIR(9648, 64), // Paper - air techncially stacks to 64 | |
+ AIR(9648, 64), // Paper - air technically stacks to 64 |
d27cb4c
to
0a1884e
Compare
Not using vanilla names but "Datakey" instead is really confusing. Mojang officially (in changelogs) calls them "Item Stack Components" or "Data Components" and the Paper API should use a similar name - everything else is just confusing to users.
I don't think adventure components existing justifies deviating from vanilla naming so much. The distinction between a Text Component and a Item Component is clear enough. Imagine someone wanting to look up a component they found in the API on the Minecraft Wiki, or the other way around. They wouldn't even know what search term they are looking for. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General ideas
+ | ||
+public interface DataKeyMap { | ||
+ | ||
+ static DataKeyMap empty() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any use for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you can wrap around a patched map
+ DataKeyMapPatch asPatch(); | ||
+ | ||
+ void applyPatch(@NotNull DataKeyMapPatch patch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should just accept/return PatchedDataKeyMap directly and possibly be moved to ItemStack or a separate interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we not want some kind of middle man object? So for example people could apply certain changes to multiple item stacks? (I would allow people to make their own patch sets)
ea00de7
to
b116c25
Compare
General changes:
Builder Types:
It should be noted that there are builder for most components for future-proofing. Advanced objects that might hold a bit more context to them... Additionally it helps gain a little more power in the data component API (such has being able to get the styled tooltip from the lore) |
+ | ||
+import org.jetbrains.annotations.Contract; | ||
+ | ||
+public interface AbstractShownInTooltip<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No likey the "Abstract" prefix. Though in any case, I would move this to a different package
5436cc7
to
b478e54
Compare
Added new pot decoration / charged projectiles type. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Superceded by #10845 to allow for easier contribution by other paper team members. |
This is like the item property api but split up into a lot of smaller chunks.
In this case, we replace item meta internally by a property map held on item stacks.
Opinions wanted: