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

Enchantment component issue #1071

Open
OceJlot opened this issue Nov 28, 2024 · 1 comment
Open

Enchantment component issue #1071

OceJlot opened this issue Nov 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@OceJlot
Copy link

OceJlot commented Nov 28, 2024

Describe the bug
Incorrect enchantments are applied after ItemStack building.

Software brand
Paper 1.21.1
PacketEvents 2.6.0

Plugins
no one except mine

How To Reproduce

  1. Build any item using ItemStack.builder()
  2. Set any enchantment to it with components, for example
    .component(ComponentTypes.ENCHANTMENTS, ItemEnchantments(mutableMapOf(EnchantmentTypes.FIRE_ASPECT to 1), true))
  3. Check how it looks in the game

Expected behavior
Correct enchantments

Screenshots
image
image

Additional context
no

@OceJlot OceJlot added the bug Something isn't working label Nov 28, 2024
@booky10
Copy link
Collaborator

booky10 commented Dec 4, 2024

This is caused by an ItemStack not having access to the enchantment registry, which is dynamically loaded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants