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

CustomEnchantment logic terminates proper enchantability check logic flow #86

Open
lcy0x1 opened this issue May 6, 2024 · 0 comments
Open

Comments

@lcy0x1
Copy link

lcy0x1 commented May 6, 2024

public boolean canEnchant( ItemStack itemStack ) {

Enchantments show allow items to override enchantability check, allowing other mod items to use your enchantments. But your custom enchantment does not allow that, causing compatibility issues.

The proper enchantability logic flow is:

  • Enchantment check if they can accept the item (as exception to EnchantmentCategory check)
  • Item check if they can accept the enchantment (as exception to EnchantmentCategory check)
  • fallback to EnchantmentCategory check
Screen Shot 2024-05-06 at 10 50 10
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

No branches or pull requests

1 participant