From 0d27a4a30484a929e02b25aa1098e097a24d340f Mon Sep 17 00:00:00 2001 From: Mrbysco Date: Tue, 22 Oct 2024 22:49:03 +0200 Subject: [PATCH] Fix coffee not applying effects (See #1422) --- .../de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java index af9063954..fb0628b74 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java @@ -61,9 +61,9 @@ public class ItemCoffee extends ItemBase { //TODO: Do we want to change the satu public ItemStack finishUsingItem(ItemStack stack, Level level, LivingEntity livingEntity) { ItemStack theStack = stack.copy(); super.finishUsingItem(stack, level, livingEntity); - applyPotionEffectsFromStack(stack, livingEntity); + applyPotionEffectsFromStack(theStack, livingEntity); theStack.setDamageValue(theStack.getDamageValue() + 1); - if (theStack.getMaxDamage() - theStack.getDamageValue() < 0) { + if (theStack.getMaxDamage() - theStack.getDamageValue() <= 0) { return new ItemStack(ActuallyItems.EMPTY_CUP.get()); } else { return theStack;