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

Replace all item meta uses with data components #61

Merged
merged 6 commits into from
Dec 22, 2024
Merged

Conversation

NonSwag
Copy link
Member

@NonSwag NonSwag commented Dec 22, 2024

This also fixes a bug where /repair made some items unstackable

Removed redundant success and failure messages for item commands, consolidating them into single, streamlined messages. Added a new message, "nothing.changed," to handle cases where an action cannot modify anything. These changes improve clarity and maintain consistency across the localization files.
Replaced SkullMeta usage with DataComponentTypes.PROFILE for cleaner and more modern profile handling. Simplifies code and improves compatibility with the updated API.
Replaced direct ItemMeta manipulation with the ItemBuilder API to simplify and streamline lore modification operations. This improves code readability, reduces redundancy, and ensures better maintainability. Added checks to prevent unnecessary changes and updated corresponding methods accordingly.
Updated the rename logic to leverage DataComponentTypes for setting and comparing custom names. Improved message handling to provide clearer feedback and ensure proper success/failure status is returned.
Updated the repair logic to handle damage data components more effectively and return appropriate success/failure states. Adjusted 'repairAll' and individual item repair methods for better error handling and accuracy.
Replaced legacy item meta manipulation with the modern DataComponent API. This change ensures proper handling of unbreakable items and improves code readability and maintainability. Added checks for item compatibility with the required data types.
@NonSwag NonSwag added bug Something isn't working enhancement New feature or request labels Dec 22, 2024
@NonSwag NonSwag self-assigned this Dec 22, 2024
@NonSwag NonSwag merged commit 5d6dfc1 into master Dec 22, 2024
2 checks passed
@NonSwag NonSwag deleted the data-components branch December 22, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant