Skip to content

Commit

Permalink
Fix recursion issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Electro593 committed Feb 3, 2025
1 parent 1c1f597 commit 3d6dddd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/de/dafuqs/spectrum/api/item/Preenchanted.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ default ItemEnchantmentsComponent buildDefaultEnchantments(RegistryWrapper.Wrapp
}
return builder.build();
}

default @NotNull ItemStack getDefaultEnchantedStack(Item item) {
ItemStack stack = item.getDefaultStack();
ItemStack stack = new ItemStack(item);
SpectrumCommon.getRegistryLookup().ifPresent(r -> stack.set(DataComponentTypes.ENCHANTMENTS, buildDefaultEnchantments(r)));
return stack;
}
Expand Down

0 comments on commit 3d6dddd

Please sign in to comment.