Fixed effects for drinking cider

This commit is contained in:
Sollace 2021-08-19 13:15:59 +02:00
parent f970950bd4
commit c8b2bc8b5f

View file

@ -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;
}