packetevents icon indicating copy to clipboard operation
packetevents copied to clipboard

Enchantment component issue

Open OceJlot opened this issue 1 year ago • 1 comments

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 avatar Nov 28 '24 13:11 OceJlot

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

booky10 avatar Dec 04 '24 17:12 booky10