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

Refactors CustomItemStack to not extend ItemStack #275

Merged
merged 10 commits into from
Oct 25, 2024
Merged

Conversation

md5sha256
Copy link
Contributor

@md5sha256 md5sha256 commented Oct 4, 2024

Refactors CustomItemStack to no longer extend ItemStack. All CIS constructors (except the color ctor) are now replaced with .create() methods with identical arguments. Additionally an ItemStackEditor fluent class with helper methods to edit the ItemMeta on an ItemStack is the builder equivalent.
Example:

ItemStack item = new CustomItemStack(...);

With

ItemStack item = CustomItemStack.create(...);

or

ItemStack item = new ItemStackEditor(material).setX(...).setX(...).create();

@md5sha256 md5sha256 requested a review from a team October 4, 2024 04:43
@md5sha256 md5sha256 requested a review from WalshyDev October 25, 2024 05:41
@WalshyDev WalshyDev merged commit 7d5738e into main Oct 25, 2024
2 checks passed
@WalshyDev WalshyDev deleted the andrew/item-utils branch October 25, 2024 05:44
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

Successfully merging this pull request may close these issues.

2 participants