Skip to content

Commit

Permalink
Terrasteel armor upgrade copies all NBT
Browse files Browse the repository at this point in the history
(fixes  #4643)
  • Loading branch information
TheRealWormbo committed May 13, 2024
1 parent 806f8ab commit 6b6d6e2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public ItemStack assemble(@NotNull CraftingContainer inv, @NotNull RegistryAcces
ItemStack out = super.assemble(inv, registries);
for (int i = 0; i < inv.getContainerSize(); i++) {
ItemStack stack = inv.getItem(i);
if (!stack.isEmpty() && stack.getItem() instanceof ArmorItem && stack.hasTag()) {
EnchantmentHelper.setEnchantments(EnchantmentHelper.getEnchantments(stack), out);
if (stack.hasTag() && stack.getItem() instanceof ArmorItem) {
out.setTag(stack.getTag());
break;
}
}
Expand Down

0 comments on commit 6b6d6e2

Please sign in to comment.