Skip to content

[Request] Add Support for Persistent Data Container #78

Open
@mercurialmusic

Description

@mercurialmusic

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions