From b3a46b00357e354ebf4c963b1dddcb38449b0533 Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 30 Oct 2024 20:28:36 +0000 Subject: [PATCH] The worm is no longer consumed when using the item in creative mode --- .../unicopia/item/BaitedFishingRodItem.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/item/BaitedFishingRodItem.java b/src/main/java/com/minelittlepony/unicopia/item/BaitedFishingRodItem.java index 57f317e8..3481bafb 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/BaitedFishingRodItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/BaitedFishingRodItem.java @@ -36,12 +36,14 @@ public class BaitedFishingRodItem extends FishingRodItem { world.spawnEntity(bobber); } - if (oldFishHook != null - && oldFishHook.getHookedEntity() == null - && oldFishHook.getDataTracker().get(FishingBobberEntity.CAUGHT_FISH) - && result.getValue().isOf(this)) { - ItemStack stack = result.getValue().withItem(Items.FISHING_ROD); - return TypedActionResult.success(stack, world.isClient()); + if (!user.isCreative()) { + if (oldFishHook != null + && oldFishHook.getHookedEntity() == null + && oldFishHook.getDataTracker().get(FishingBobberEntity.CAUGHT_FISH) + && result.getValue().isOf(this)) { + ItemStack stack = result.getValue().withItem(Items.FISHING_ROD); + return TypedActionResult.success(stack, world.isClient()); + } } } return result;