From c8b2bc8b5f2153634e4c5d2174065dc24864dcb9 Mon Sep 17 00:00:00 2001 From: Sollace Date: Thu, 19 Aug 2021 13:15:59 +0200 Subject: [PATCH] Fixed effects for drinking cider --- .../java/com/minelittlepony/unicopia/item/DrinkableItem.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/minelittlepony/unicopia/item/DrinkableItem.java b/src/main/java/com/minelittlepony/unicopia/item/DrinkableItem.java index 09bbc584..6ee37e0d 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/DrinkableItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/DrinkableItem.java @@ -1,5 +1,7 @@ package com.minelittlepony.unicopia.item; +import com.minelittlepony.unicopia.item.toxin.ToxicHolder; + import net.minecraft.advancement.criterion.Criteria; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; @@ -27,6 +29,8 @@ public class DrinkableItem extends Item { stack.decrement(1); } + ((ToxicHolder)this).getToxic().ifPresent(t -> t.finishUsing(stack, world, user)); + return stack.isEmpty() ? new ItemStack(getRecipeRemainder()) : stack; }