Skip to content

Commit

Permalink
Fixed 1.20.6+ getEnchants
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFP committed Jun 20, 2024
1 parent 6faaac2 commit 61c90d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 61c90d8

Please sign in to comment.