The worm is no longer consumed when using the item in creative mode

This commit is contained in:
Sollace 2024-10-30 20:28:36 +00:00
parent ff18b2d4f0
commit b3a46b0035
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -36,6 +36,7 @@ public class BaitedFishingRodItem extends FishingRodItem {
world.spawnEntity(bobber);
}
if (!user.isCreative()) {
if (oldFishHook != null
&& oldFishHook.getHookedEntity() == null
&& oldFishHook.getDataTracker().get(FishingBobberEntity.CAUGHT_FISH)
@ -44,6 +45,7 @@ public class BaitedFishingRodItem extends FishingRodItem {
return TypedActionResult.success(stack, world.isClient());
}
}
}
return result;
}