From f8ff162d6c7672ca329d572d408405e5a14536cf Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 29 Mar 2024 12:31:33 +0000 Subject: [PATCH] Properly copy all stack attributes when consuming the bait from a fishing rod --- .../minelittlepony/unicopia/item/BaitedFishingRodItem.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/item/BaitedFishingRodItem.java b/src/main/java/com/minelittlepony/unicopia/item/BaitedFishingRodItem.java index 6c0a03b3..3efa7744 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/BaitedFishingRodItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/BaitedFishingRodItem.java @@ -30,7 +30,9 @@ public class BaitedFishingRodItem extends FishingRodItem { if (result.getValue().isOf(this)) { ItemStack stack = Items.FISHING_ROD.getDefaultStack(); - stack.setDamage(result.getValue().getDamage()); + if (result.getValue().hasNbt()) { + stack.setNbt(result.getValue().getNbt().copy()); + } return TypedActionResult.success(stack, world.isClient()); } }