mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Fix coffee not applying effects (See #1422)
This commit is contained in:
parent
e91c1569ee
commit
0d27a4a304
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
public ItemStack finishUsingItem(ItemStack stack, Level level, LivingEntity livingEntity) {
|
||||||
ItemStack theStack = stack.copy();
|
ItemStack theStack = stack.copy();
|
||||||
super.finishUsingItem(stack, level, livingEntity);
|
super.finishUsingItem(stack, level, livingEntity);
|
||||||
applyPotionEffectsFromStack(stack, livingEntity);
|
applyPotionEffectsFromStack(theStack, livingEntity);
|
||||||
theStack.setDamageValue(theStack.getDamageValue() + 1);
|
theStack.setDamageValue(theStack.getDamageValue() + 1);
|
||||||
if (theStack.getMaxDamage() - theStack.getDamageValue() < 0) {
|
if (theStack.getMaxDamage() - theStack.getDamageValue() <= 0) {
|
||||||
return new ItemStack(ActuallyItems.EMPTY_CUP.get());
|
return new ItemStack(ActuallyItems.EMPTY_CUP.get());
|
||||||
} else {
|
} else {
|
||||||
return theStack;
|
return theStack;
|
||||||
|
|
Loading…
Reference in a new issue