Fixed 1.20.6+ getEnchants

This commit is contained in:
Auxilor
2024-06-20 23:14:09 +01:00
parent 6faaac2257
commit 61c90d85ac
2 changed files with 2 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ class FastItemStackFactory : FastItemStackFactoryProxy {
}
if (checkStored) {
val stored = handle.get(DataComponents.ENCHANTMENTS) ?: return map
val stored = handle.get(DataComponents.STORED_ENCHANTMENTS) ?: return map
for ((enchantment, level) in stored.entrySet()) {
val bukkit = CraftEnchantment.minecraftToBukkit(enchantment.value())

View File

@@ -70,7 +70,7 @@ class FastItemStackFactory : FastItemStackFactoryProxy {
}
if (checkStored) {
val stored = handle.get(DataComponents.ENCHANTMENTS) ?: return map
val stored = handle.get(DataComponents.STORED_ENCHANTMENTS) ?: return map
for ((enchantment, level) in stored.entrySet()) {
val bukkit = CraftEnchantment.minecraftToBukkit(enchantment.value())