From 8280a0283b4fcbd068cc16a198e7c75ea5564792 Mon Sep 17 00:00:00 2001 From: Elenterius Date: Thu, 22 Aug 2024 20:34:12 +0200 Subject: [PATCH] feat: make Living Flesh consumable --- .../java/com/github/elenterius/biomancy/init/ModFoods.java | 5 +++++ .../java/com/github/elenterius/biomancy/init/ModItems.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/elenterius/biomancy/init/ModFoods.java b/src/main/java/com/github/elenterius/biomancy/init/ModFoods.java index ac9ae4dc9..b7dde46cf 100644 --- a/src/main/java/com/github/elenterius/biomancy/init/ModFoods.java +++ b/src/main/java/com/github/elenterius/biomancy/init/ModFoods.java @@ -23,6 +23,11 @@ public final class ModFoods { public static final FoodProperties POOR_FLESH = new FoodProperties.Builder().nutrition(1).saturationMod(0.2f).meat().build(); public static final FoodProperties AVERAGE_FLESH = new FoodProperties.Builder().nutrition(2).saturationMod(0.4f).meat().build(); + public static final FoodProperties LIVING_FLESH = new FoodProperties.Builder().nutrition(2).saturationMod(0.4f).meat() + .effect(() -> new MobEffectInstance(ModMobEffects.PRIMORDIAL_INFESTATION.get(), 20 * 12, 0), 0.4f) + .effect(() -> new MobEffectInstance(MobEffects.CONFUSION, 20 * 6, 0), 0.8f) + .build(); + public static final FoodProperties NUTRIENT_BAR = new FoodProperties.Builder().nutrition(9).saturationMod(1.8f).build(); public static final FoodProperties NUTRIENT_PASTE = new FoodProperties.Builder().nutrition(1).saturationMod(0.2f).build(); public static final FoodProperties PROTEIN_BAR = new FoodProperties.Builder().nutrition(5).saturationMod(0.4f).meat().build(); diff --git a/src/main/java/com/github/elenterius/biomancy/init/ModItems.java b/src/main/java/com/github/elenterius/biomancy/init/ModItems.java index 7b19a4164..be106ba1f 100644 --- a/src/main/java/com/github/elenterius/biomancy/init/ModItems.java +++ b/src/main/java/com/github/elenterius/biomancy/init/ModItems.java @@ -85,7 +85,7 @@ public final class ModItems { //## Special public static final RegistryObject PRIMORDIAL_CORE = registerSimpleItem("primordial_core", ModRarities.VERY_RARE); - public static final RegistryObject LIVING_FLESH = registerSimpleItem("living_flesh", ModRarities.VERY_RARE); + public static final RegistryObject LIVING_FLESH = registerItem("living_flesh", props -> new SimpleItem(props.food(ModFoods.LIVING_FLESH).rarity(ModRarities.VERY_RARE))); public static final RegistryObject ESSENCE = registerItem("essence", EssenceItem::new); public static final RegistryObject GIFT_SAC = registerItem("gift_sac", props -> new GiftSacItem(props.stacksTo(1).rarity(ModRarities.ULTRA_RARE)));