From 31a4648b42b8b34b9656e73e01cf6d2329e35a04 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Fri, 30 Aug 2024 23:07:09 +0100 Subject: Decrement stack after spawning the eye Otherwise the last thrown eye will become a normal eye. Doh. --- src/main/java/ski/kramkow/mcmod/eyeofnether/EyeOfNetherItem.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/ski/kramkow/mcmod/eyeofnether/EyeOfNetherItem.java b/src/main/java/ski/kramkow/mcmod/eyeofnether/EyeOfNetherItem.java index 233205a..ceac6eb 100644 --- a/src/main/java/ski/kramkow/mcmod/eyeofnether/EyeOfNetherItem.java +++ b/src/main/java/ski/kramkow/mcmod/eyeofnether/EyeOfNetherItem.java @@ -58,9 +58,6 @@ public class EyeOfNetherItem extends Item { } if (pos_pair != null) { user.swingHand(hand, true); - if (!user.getAbilities().creativeMode) { - stack.decrement(1); - } // Worth changing this and the sound/event if/when that gets replaced with a // custom entity. @@ -90,6 +87,10 @@ public class EyeOfNetherItem extends Item { GameEvent.Emitter.of(user)); user.incrementStat(Stats.USED.getOrCreateStat(this)); + if (!user.getAbilities().creativeMode) { + stack.decrement(1); + } + return TypedActionResult.success(stack); } } -- cgit v1.2.3-54-g00ecf