mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-26 22:34:32 +01:00
24 lines
670 B
Java
24 lines
670 B
Java
|
package com.minelittlepony.unicopia.item;
|
||
|
|
||
|
import net.minecraft.entity.LivingEntity;
|
||
|
import net.minecraft.entity.effect.StatusEffects;
|
||
|
import net.minecraft.item.FoodComponent;
|
||
|
import net.minecraft.item.Item;
|
||
|
import net.minecraft.item.ItemStack;
|
||
|
import net.minecraft.world.World;
|
||
|
|
||
|
public class TomatoItem extends Item {
|
||
|
|
||
|
public TomatoItem(FoodComponent components) {
|
||
|
super(new Settings().food(components));
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public ItemStack finishUsing(ItemStack stack, World world, LivingEntity entity) {
|
||
|
stack = super.finishUsing(stack, world, entity);
|
||
|
entity.removePotionEffect(StatusEffects.NAUSEA);
|
||
|
return stack;
|
||
|
}
|
||
|
|
||
|
}
|