I don't know how to get the enchantment level of an Itemstack since 1.20.5 #3866
-
Descriptionthe |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I have read the implement of |
Beta Was this translation helpful? Give feedback.
-
Thanks, it helps me a lot, and it also works on 1.21. |
Beta Was this translation helpful? Give feedback.
-
Why is it so convoluted now? Is there a reason for this bullcrap? |
Beta Was this translation helpful? Give feedback.
I have read the implement of
CraftRegistry
in craftbukkit and now have known how to convertRegistryKey<Enchantment>
toRegistryEntry<Enchantment>
It should useserver.getRegistryManager().get(RegistryKeys.ENCHANTMENT).getEntry(enchantment_registry_key).get()
.