Skip to content
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

[Request] Add Support for Persistent Data Container #78

Open
mercurialmusic opened this issue Sep 14, 2024 · 0 comments
Open

[Request] Add Support for Persistent Data Container #78

mercurialmusic opened this issue Sep 14, 2024 · 0 comments

Comments

@mercurialmusic
Copy link
Contributor

I am coding n00b otherwise I'd attempt a pull request, but it appears that CheckItem does not currently have support for the modern Persistent Data Container methods, which will be increasingly necessary in a post 1.20.5 world.

For our use-case, we had been using CheckItem with %checkitem_inhand,nbtstrings:MYTHIC_TYPE=ExampleName% to get the base item type for Mythic items and ignore any alterations that may have otherwise occurred with the item, but this method was broken when Mythic converted data tags to use PDC. After speaking with them, it looks like CheckItem could add PDC support by using, for example: item.getItemMeta().getPersistentDataContainer().has(new NamespacedKey("mythicmobs", "type")) to check for mythicmobs:type in PDC. I'm not sure how feasible this is or if it's in the scope of this expansion, but it would certainly be incredibly useful to have even if legacy methods remain available.

Thanks for the consideration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant