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

Made items with InnateEnchantments be enchantable in the enchanting table #230

Merged
merged 1 commit into from
Jul 2, 2023

Conversation

DaFuqs
Copy link
Contributor

@DaFuqs DaFuqs commented Jul 2, 2023

Added a new method onlyHasInnateEnchantments() that returns if a stack only has the enchants (or lesser) that it has, by it InnateEnchantment definition, or other enchants have been added by other means.

The mixin in ItemStack allows the Enchanting Table (and other mods) to recognise see the stack as enchantable, even if it has its innate enchantments. Normally that method would always return false, if a stack already had enchantments.

@chronosacaria
Copy link
Owner

Thank you, @DaFuqs!

@chronosacaria chronosacaria merged commit 9451e46 into chronosacaria:1.20 Jul 2, 2023
2 checks passed
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.

None yet

2 participants