Replies: 3 comments
-
ItemMeta is contractually a snapshot, there is no way to implement ItemMeta without cloning the entire existing data structure; This would need to be an entirely separate API for this specific purpose |
Beta Was this translation helpful? Give feedback.
0 replies
-
I mean, couldn't you say the same about block states? yet paper still allows you not take a snapshot |
Beta Was this translation helpful? Give feedback.
0 replies
-
That API works fundamentally differently to how ItemMeta works |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
Itemstack.getItemmeta() even when you only want something like displayname clones the entire meta and if the item is a written book, runs heavy regex on every page taking excess of 100ms in some cases
Describe the solution you'd like
perhaps getitemmeta(boolean snapshot) or a new interface called liveItemmeta etc. Something that wouldn't break plugins already using it this way. Perhaps parts of the meta could be initialized when the for example getlore() methods are called etc
Describe alternatives you've considered
There isn't really any other solution other than using NMS to read NBT an item's NBT tags.
Additional context
Add any other context or screenshots about the feature request here.
Beta Was this translation helpful? Give feedback.
All reactions