mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 13:37:58 +01:00
The worm is no longer consumed when using the item in creative mode
This commit is contained in:
parent
ff18b2d4f0
commit
b3a46b0035
1 changed files with 8 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue