|
|
|
@ -8,13 +8,21 @@ import net.minecraft.util.Identifier;
|
|
|
|
|
import net.minecraft.item.ItemGroup;
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
import net.minecraft.item.Items;
|
|
|
|
|
import net.minecraft.item.FoodComponent.Builder;
|
|
|
|
|
import net.minecraft.util.Rarity;
|
|
|
|
|
import net.minecraft.entity.effect.StatusEffects;
|
|
|
|
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
|
|
|
|
import net.minecraft.item.BlockItem;
|
|
|
|
|
import net.minecraft.item.FoodComponent;
|
|
|
|
|
import net.minecraft.item.Item;
|
|
|
|
|
import net.minecraft.item.ItemConvertible;
|
|
|
|
|
import static net.minecraft.block.ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE;
|
|
|
|
|
|
|
|
|
|
import java.util.EnumSet;
|
|
|
|
|
|
|
|
|
|
import net.yyc12345.teyvatcraft.items.SeedItem;
|
|
|
|
|
import net.yyc12345.teyvatcraft.items.TeyvatFoodItem;
|
|
|
|
|
import net.yyc12345.teyvatcraft.items.TeyvatFoodType;
|
|
|
|
|
|
|
|
|
|
public class ItemsManager {
|
|
|
|
|
public static final ItemGroup ITEMGROUP_MISC = FabricItemGroupBuilder.build(new Identifier("teyvatcraft", "misc"), () -> new ItemStack(Items.NETHER_STAR));
|
|
|
|
@ -271,68 +279,68 @@ public class ItemsManager {
|
|
|
|
|
public static final Item DENDROCIDE_POTION = new Item(new FabricItemSettings().group(ITEMGROUP_POTION));
|
|
|
|
|
|
|
|
|
|
// foods
|
|
|
|
|
public static final Item CHICKEN_MUSHROOM_SKEWER = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item TEYVAT_FRIED_EGG = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item STEAK = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item RADISH_VEGGIE_SOUP = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item MONDSTADT_GRILLED_FISH = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item MORA_MEAT = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item STIR_FRIED_FILET = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item MINT_JELLY = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item GRILLED_TIGER_FISH = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item FLAMING_RED_BOLOGNESE = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item SWEET_MADAME = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item NORTHERN_SMOKED_CHICKEN = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item TEA_BREAK_PANCAKE = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item FRIED_RADISH_BALLS = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item SATISFYING_SALAD = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item FISHERMANS_TOAST = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item ALMOND_TOFU = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item JUEYUN_CHILI_CHICKEN = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item JEWELRY_SOUP = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item MATSUTAKE_MEAT_ROLLS = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item CRYSTAL_SHRIMP = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item LOTUS_SEED_AND_BIRD_EGG_SOUP = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item CREAM_STEW = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item NOODLES_WITH_MOUNTAIN_DELICACIES = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item GOLDEN_SHRIMP_BALLS = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item GOULASH = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item VEGETARIAN_ABALONE = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item STONE_HARBOR_DELICACIES = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item MINT_SALAD = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item CRAB_ROE_TOFU = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item STIR_FRIED_FISH_NOODLES = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item CALLA_LILY_SEAFOOD_SOUP = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item STICKY_HONEY_ROAST = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item MUSHROOM_PIZZA = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item MONDSTADT_HASH_BROWN = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item PILE_EM_UP = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item ZHONGYUAN_CHOP_SUEY = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item BLACK_BACK_PERCH_STEW = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item SQUIRREL_FISH = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item COME_AND_GET_IT = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item SAUTEED_MATSUTAKE = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item COLD_CUT_PLATTER = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item QINGCE_STIR_FRY = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item BARBATOS_RATATOUILLE = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item CRAB_HAM_VEGGIE_BAKE = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item NORTHERN_APPLE_STEW = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item ADVENTURERS_BREAKFAST_SANDWICH = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item LOTUS_FLOWER_CRISP = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item TRIPLE_LAYERED_CONSOMME = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item BAMBOO_SHOOT_SOUP = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item UNIVERSAL_PEACE = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item JUEYUN_GUOBA = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item SUNSHINE_SPRAT = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item FULLMOON_EGG = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item CRISPY_POTATO_SHRIMP_PLATTER = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item CURED_PORK_DRY_HOTPOT = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item MINTY_MEAT_ROLLS = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item JADE_PARCELS = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item GOLDEN_CRAB = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item MOON_PIE = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item TIANSHU_MEAT = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item ADEPTUS_TEMPTATION = new Item(new FabricItemSettings().group(ITEMGROUP_FOOD));
|
|
|
|
|
public static final Item CHICKEN_MUSHROOM_SKEWER = new TeyvatFoodItem(ITEMGROUP_FOOD, 1, EnumSet.of(TeyvatFoodType.RestoreHP));
|
|
|
|
|
public static final Item TEYVAT_FRIED_EGG = new TeyvatFoodItem(ITEMGROUP_FOOD, 1, EnumSet.of(TeyvatFoodType.Revive));
|
|
|
|
|
public static final Item STEAK = new TeyvatFoodItem(ITEMGROUP_FOOD, 1, EnumSet.of(TeyvatFoodType.Revive));
|
|
|
|
|
public static final Item RADISH_VEGGIE_SOUP = new TeyvatFoodItem(ITEMGROUP_FOOD, 1, EnumSet.of(TeyvatFoodType.RestoreHP, TeyvatFoodType.GraduallyRestoreHP));
|
|
|
|
|
public static final Item MONDSTADT_GRILLED_FISH = new TeyvatFoodItem(ITEMGROUP_FOOD, 1, EnumSet.of(TeyvatFoodType.Revive));
|
|
|
|
|
public static final Item MORA_MEAT = new TeyvatFoodItem(ITEMGROUP_FOOD, 1, EnumSet.of(TeyvatFoodType.Revive));
|
|
|
|
|
public static final Item STIR_FRIED_FILET = new TeyvatFoodItem(ITEMGROUP_FOOD, 1, EnumSet.of(TeyvatFoodType.Revive));
|
|
|
|
|
public static final Item MINT_JELLY = new TeyvatFoodItem(ITEMGROUP_FOOD, 1, EnumSet.of(TeyvatFoodType.RestoreHP));
|
|
|
|
|
public static final Item GRILLED_TIGER_FISH = new TeyvatFoodItem(ITEMGROUP_FOOD, 1, EnumSet.of(TeyvatFoodType.RestoreHP));
|
|
|
|
|
public static final Item FLAMING_RED_BOLOGNESE = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.RestoreHP, TeyvatFoodType.GraduallyRestoreHP));
|
|
|
|
|
public static final Item SWEET_MADAME = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.RestoreHP));
|
|
|
|
|
public static final Item NORTHERN_SMOKED_CHICKEN = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.RestoreStamina));
|
|
|
|
|
public static final Item TEA_BREAK_PANCAKE = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.Revive));
|
|
|
|
|
public static final Item FRIED_RADISH_BALLS = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item SATISFYING_SALAD = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item FISHERMANS_TOAST = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.IncreaseDEF));
|
|
|
|
|
public static final Item ALMOND_TOFU = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item JUEYUN_CHILI_CHICKEN = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item JEWELRY_SOUP = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.IncreaseDEF));
|
|
|
|
|
public static final Item MATSUTAKE_MEAT_ROLLS = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.RestoreHP));
|
|
|
|
|
public static final Item CRYSTAL_SHRIMP = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.RestoreHP, TeyvatFoodType.GraduallyRestoreHP));
|
|
|
|
|
public static final Item LOTUS_SEED_AND_BIRD_EGG_SOUP = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.DecreaseStamina_Sprint));
|
|
|
|
|
public static final Item CREAM_STEW = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.DecreaseStamina_Sprint));
|
|
|
|
|
public static final Item NOODLES_WITH_MOUNTAIN_DELICACIES = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.RestoreStamina));
|
|
|
|
|
public static final Item GOLDEN_SHRIMP_BALLS = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.Revive));
|
|
|
|
|
public static final Item GOULASH = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.DecreaseColdAccumulation));
|
|
|
|
|
public static final Item VEGETARIAN_ABALONE = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.Revive));
|
|
|
|
|
public static final Item STONE_HARBOR_DELICACIES = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item MINT_SALAD = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item CRAB_ROE_TOFU = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.Revive));
|
|
|
|
|
public static final Item STIR_FRIED_FISH_NOODLES = new TeyvatFoodItem(ITEMGROUP_FOOD, 2, EnumSet.of(TeyvatFoodType.RestoreHP, TeyvatFoodType.GraduallyRestoreHP));
|
|
|
|
|
public static final Item CALLA_LILY_SEAFOOD_SOUP = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.IncreaseDEF));
|
|
|
|
|
public static final Item STICKY_HONEY_ROAST = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.DecreaseStamina_Climb, TeyvatFoodType.DecreaseStamina_Sprint));
|
|
|
|
|
public static final Item MUSHROOM_PIZZA = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.RestoreHP, TeyvatFoodType.GraduallyRestoreHP));
|
|
|
|
|
public static final Item MONDSTADT_HASH_BROWN = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.RestoreHP));
|
|
|
|
|
public static final Item PILE_EM_UP = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item ZHONGYUAN_CHOP_SUEY = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.DecreaseStamina_Climb, TeyvatFoodType.DecreaseStamina_Sprint));
|
|
|
|
|
public static final Item BLACK_BACK_PERCH_STEW = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.RestoreHP, TeyvatFoodType.GraduallyRestoreHP));
|
|
|
|
|
public static final Item SQUIRREL_FISH = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.RestoreHP));
|
|
|
|
|
public static final Item COME_AND_GET_IT = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item SAUTEED_MATSUTAKE = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item COLD_CUT_PLATTER = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item QINGCE_STIR_FRY = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item BARBATOS_RATATOUILLE = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.DecreaseStamina_Misc, TeyvatFoodType.DecreaseStamina_Sprint));
|
|
|
|
|
public static final Item CRAB_HAM_VEGGIE_BAKE = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.Revive));
|
|
|
|
|
public static final Item NORTHERN_APPLE_STEW = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.RestoreHP));
|
|
|
|
|
public static final Item ADVENTURERS_BREAKFAST_SANDWICH = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item LOTUS_FLOWER_CRISP = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.IncreaseDEF));
|
|
|
|
|
public static final Item TRIPLE_LAYERED_CONSOMME = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.IncreaseShieldStrength));
|
|
|
|
|
public static final Item BAMBOO_SHOOT_SOUP = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.RestoreHP, TeyvatFoodType.GraduallyRestoreHP));
|
|
|
|
|
public static final Item UNIVERSAL_PEACE = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.RestoreHP));
|
|
|
|
|
public static final Item JUEYUN_GUOBA = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item SUNSHINE_SPRAT = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.IncreaseShieldStrength));
|
|
|
|
|
public static final Item FULLMOON_EGG = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.Revive));
|
|
|
|
|
public static final Item CRISPY_POTATO_SHRIMP_PLATTER = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.RestoreHP, TeyvatFoodType.GraduallyRestoreHP));
|
|
|
|
|
public static final Item CURED_PORK_DRY_HOTPOT = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item MINTY_MEAT_ROLLS = new TeyvatFoodItem(ITEMGROUP_FOOD, 3, EnumSet.of(TeyvatFoodType.DecreaseStamina_Misc, TeyvatFoodType.DecreaseStamina_Sprint));
|
|
|
|
|
public static final Item JADE_PARCELS = new TeyvatFoodItem(ITEMGROUP_FOOD, 4, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item GOLDEN_CRAB = new TeyvatFoodItem(ITEMGROUP_FOOD, 4, EnumSet.of(TeyvatFoodType.IncreaseDEF));
|
|
|
|
|
public static final Item MOON_PIE = new TeyvatFoodItem(ITEMGROUP_FOOD, 4, EnumSet.of(TeyvatFoodType.IncreaseShieldStrength, TeyvatFoodType.IncreaseDEF));
|
|
|
|
|
public static final Item TIANSHU_MEAT = new TeyvatFoodItem(ITEMGROUP_FOOD, 4, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
public static final Item ADEPTUS_TEMPTATION = new TeyvatFoodItem(ITEMGROUP_FOOD, 5, EnumSet.of(TeyvatFoodType.IncreaseATK_CRIT_DMG));
|
|
|
|
|
|
|
|
|
|
// register func
|
|
|
|
|
private static void registerAsCompostableItem(String name, Item it, Boolean isSeed) {
|
|
|
|
@ -341,6 +349,24 @@ public class ItemsManager {
|
|
|
|
|
else ITEM_TO_LEVEL_INCREASE_CHANCE.put(it, 0.3f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static FoodComponent getTeyvatFoodComponent(int star, EnumSet<TeyvatFoodType> types) {
|
|
|
|
|
Builder foodComponent = (new FoodComponent.Builder()).hunger(2 * star).saturationModifier(3.0F * star).alwaysEdible();
|
|
|
|
|
|
|
|
|
|
if (types.contains(TeyvatFoodType.Revive)) ;
|
|
|
|
|
if (types.contains(TeyvatFoodType.DecreaseColdAccumulation)) ;
|
|
|
|
|
if (types.contains(TeyvatFoodType.DecreaseStamina_Sprint)) foodComponent.statusEffect(new StatusEffectInstance(StatusEffects.SPEED, 900 * 20, star - 1), 1.0F);
|
|
|
|
|
if (types.contains(TeyvatFoodType.DecreaseStamina_Climb)) foodComponent.statusEffect(new StatusEffectInstance(StatusEffects.JUMP_BOOST, 900 * 20, star - 1), 1.0F);
|
|
|
|
|
if (types.contains(TeyvatFoodType.DecreaseStamina_Misc)) foodComponent.statusEffect(new StatusEffectInstance(StatusEffects.HASTE, 900 * 20, star - 1), 1.0F);
|
|
|
|
|
if (types.contains(TeyvatFoodType.RestoreHP)) foodComponent.statusEffect(new StatusEffectInstance(StatusEffects.INSTANT_HEALTH, 1, star - 1), 1.0F);
|
|
|
|
|
if (types.contains(TeyvatFoodType.GraduallyRestoreHP)) foodComponent.statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 30 * 20, star - 1), 1.0F);
|
|
|
|
|
if (types.contains(TeyvatFoodType.RestoreStamina)) foodComponent.statusEffect(new StatusEffectInstance(StatusEffects.SATURATION, 50 * 20, star - 1), 1.0F);
|
|
|
|
|
if (types.contains(TeyvatFoodType.IncreaseATK_CRIT_DMG)) foodComponent.statusEffect(new StatusEffectInstance(StatusEffects.STRENGTH, 300 * 20, star - 1), 1.0F);
|
|
|
|
|
if (types.contains(TeyvatFoodType.IncreaseDEF)) foodComponent.statusEffect(new StatusEffectInstance(StatusEffects.RESISTANCE, 300 * 20, star - 1), 1.0F);
|
|
|
|
|
if (types.contains(TeyvatFoodType.IncreaseShieldStrength)) foodComponent.statusEffect(new StatusEffectInstance(StatusEffects.ABSORPTION, 300 * 20, star - 1), 1.0F);
|
|
|
|
|
|
|
|
|
|
return foodComponent.build();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
private static void registerCompostableItem(float levelIncreaseChance, ItemConvertible item) {
|
|
|
|
|
ITEM_TO_LEVEL_INCREASE_CHANCE.put(item.asItem(), levelIncreaseChance);
|
|
|
|
|