diff --git a/src/main/java/io/github/afamiliarquiet/familiar_magic/item/TrueNameItem.java b/src/main/java/io/github/afamiliarquiet/familiar_magic/item/TrueNameItem.java index 033a6e2..85d7677 100644 --- a/src/main/java/io/github/afamiliarquiet/familiar_magic/item/TrueNameItem.java +++ b/src/main/java/io/github/afamiliarquiet/familiar_magic/item/TrueNameItem.java @@ -1,5 +1,6 @@ package io.github.afamiliarquiet.familiar_magic.item; +import io.github.afamiliarquiet.familiar_magic.FamiliarMagic; import io.github.afamiliarquiet.familiar_magic.FamiliarTricks; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.component.DataComponents; @@ -31,7 +32,7 @@ public InteractionResult interactLivingEntity(ItemStack nameTag, Player player, ItemStack trueName = FamiliarItems.TRUE_NAME_ITEM.toStack(); trueName.set(DataComponents.CUSTOM_NAME, Component.literal(FamiliarTricks.uuidToTrueName(target.getUUID()))); - ItemStack handStack = ItemUtils.createFilledResult(nameTag, player, trueName, false); + ItemStack handStack = ItemUtils.createFilledResult(nameTag.copy(), player, trueName, false); player.setItemInHand(hand, handStack); } diff --git a/src/main/java/io/github/afamiliarquiet/familiar_magic/mixin/TrueNameTagMixin.java b/src/main/java/io/github/afamiliarquiet/familiar_magic/mixin/TrueNameTagMixin.java index c6f0c9f..b04546a 100644 --- a/src/main/java/io/github/afamiliarquiet/familiar_magic/mixin/TrueNameTagMixin.java +++ b/src/main/java/io/github/afamiliarquiet/familiar_magic/mixin/TrueNameTagMixin.java @@ -28,7 +28,7 @@ private void interactLivingEntity(ItemStack nameTag, Player player, LivingEntity ItemStack trueName = FamiliarItems.TRUE_NAME_ITEM.toStack(); trueName.set(DataComponents.CUSTOM_NAME, Component.literal(FamiliarTricks.uuidToTrueName(target.getUUID()))); - ItemStack handStack = ItemUtils.createFilledResult(nameTag, player, trueName, false); + ItemStack handStack = ItemUtils.createFilledResult(nameTag.copy(), player, trueName, false); player.setItemInHand(hand, handStack); }