diff --git a/src/main/java/ml/pluto7073/plutoscoffee/items/CoffeeBean.java b/src/main/java/ml/pluto7073/plutoscoffee/items/CoffeeBean.java index 083b71b..7c47ff9 100644 --- a/src/main/java/ml/pluto7073/plutoscoffee/items/CoffeeBean.java +++ b/src/main/java/ml/pluto7073/plutoscoffee/items/CoffeeBean.java @@ -1,9 +1,21 @@ package ml.pluto7073.plutoscoffee.items; +import net.minecraft.entity.effect.StatusEffectInstance; +import net.minecraft.entity.effect.StatusEffects; +import net.minecraft.item.FoodComponent; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; -public class CoffeeBean extends Item{ +public class CoffeeBean extends Item { + + public static FoodComponent.Builder COFFEE_BEAN_FOOD_COMPONENT = new FoodComponent.Builder() + .snack() + .alwaysEdible() + .hunger(1) + .saturationModifier(0.5f) + .statusEffect(new StatusEffectInstance(StatusEffects.SPEED, 20 * 10), 1) + .statusEffect(new StatusEffectInstance(StatusEffects.JUMP_BOOST, 20 * 10), 1) + .statusEffect(new StatusEffectInstance(StatusEffects.HASTE, 20 * 10), 1); public CoffeeBean() { super(new Item.Settings().group(ItemGroup.FOOD)); diff --git a/src/main/java/ml/pluto7073/plutoscoffee/items/CoffeeBeanRoasted.java b/src/main/java/ml/pluto7073/plutoscoffee/items/CoffeeBeanRoasted.java index a84c3f0..ccc073e 100644 --- a/src/main/java/ml/pluto7073/plutoscoffee/items/CoffeeBeanRoasted.java +++ b/src/main/java/ml/pluto7073/plutoscoffee/items/CoffeeBeanRoasted.java @@ -6,7 +6,7 @@ public class CoffeeBeanRoasted extends Item { public CoffeeBeanRoasted() { - super(new Item.Settings().group(ItemGroup.FOOD)); + super(new Item.Settings().group(ItemGroup.FOOD).food(CoffeeBean.COFFEE_BEAN_FOOD_COMPONENT.build())); } }