Skip to content

Remove MetaUtils #799

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

Closed
wants to merge 1 commit into from
Closed

Remove MetaUtils #799

wants to merge 1 commit into from

Conversation

Protonull
Copy link
Contributor

This primarily removes MetaUtils (#793) and modernises ItemUtils. The bulk of the changes in this PR is the renaming of, for example, setDisplayName to setLegacyDisplayName so that setComponentDisplayName can just be setDisplayName.

The "legacy" methods still use ItemMeta instead of using data components because I cannot guarantee that LegacyComponentSerializer serialises components the same way that ItemMeta does, since ItemMeta uses CraftChatMessage internally.

I've also removed the varargs variants of the "set" and "add" lore methods: there were (and still are) far too many sequential addLore calls adding only a single line each time. If people are forced to do List.of() then maybe they'll collect it all into a single call... one can hope.

I've also added getCustomData and editCustomData and updated ItemExchange to use them: the current code is adequate but brittle and inefficient.

This also updates the DebugWand hack to use CivModCore's CustomItem interface. I want to move as many things away from the ItemUtils#areItemsSimilar (and consequently ChatUtils#areComponentsEqual) as possible.

This primarily removes MetaUtils, plus modernises ItemUtils.
@github-project-automation github-project-automation bot moved this to Backlog in CivMC Roadmap May 6, 2025
@Protonull Protonull closed this by deleting the head repository Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

1 participant