const iceCreams = [
  // Vanilla
  "create_ice_creams:coned_vanilla_ice_cream",
  "create_ice_creams:coned_vanilla_sweet_berries_ice_cream",
  "create_ice_creams:coned_vanilla_glow_berries_ice_cream",
  "create_ice_creams:coned_vanilla_chorus_fruit_ice_cream",
  "create_ice_creams:coned_vanilla_carrot_ice_cream",
  "create_ice_creams:coned_vanilla_fusion_ice_cream",
  // Chocolate
  "create_ice_creams:coned_chocolate_ice_cream",
  "create_ice_creams:coned_chocolate_sweet_berries_ice_cream",
  "create_ice_creams:coned_chocolate_glow_berries_ice_cream",
  "create_ice_creams:coned_chocolate_chorus_fruit_ice_cream",
  "create_ice_creams:coned_chocolate_carrot_ice_cream",
  "create_ice_creams:coned_chocolate_fusion_ice_cream",
  // Toffee
  "create_ice_creams:coned_toffee_ice_cream",
  "create_ice_creams:coned_toffee_sweet_berries_ice_cream",
  "create_ice_creams:coned_toffee_glow_berries_ice_cream",
  "create_ice_creams:coned_toffee_chorus_fruit_ice_cream",
  "create_ice_creams:coned_toffee_carrot_ice_cream",
  "create_ice_creams:coned_toffee_fusion_ice_cream",
  // Bubblegum
  "create_ice_creams:coned_bubblegum_flavored_ice_cream",
  "create_ice_creams:coned_bubblegum_flavored_sweet_berries_ice_cream",
  "create_ice_creams:coned_bubblegum_flavored_glow_berries_ice_cream",
  "create_ice_creams:coned_bubblegum_flavored_chorus_fruit_ice_cream",
  "create_ice_creams:coned_bubblegum_flavored_carrot_ice_cream",
  "create_ice_creams:coned_bubblegum_flavored_fusion_ice_cream",
  // Mint
  "create_ice_creams:coned_mint_ice_cream",
  "create_ice_creams:coned_mint_sweet_berries_ice_cream",
  "create_ice_creams:coned_mint_glow_berries_ice_cream",
  "create_ice_creams:coned_mint_chorus_fruit_ice_cream",
  "create_ice_creams:coned_mint_carrot_ice_cream",
  "create_ice_creams:coned_mint_fusion_ice_cream",
  // Watermelon
  "create_ice_creams:coned_watermelon_ice_cream",
  "create_ice_creams:coned_watermelon_sweet_berries_ice_cream",
  "create_ice_creams:coned_watermelon_glow_berries_ice_cream",
  "create_ice_creams:coned_watermelon_chorus_fruit_ice_cream",
  "create_ice_creams:coned_watermelon_carrot_ice_cream",
  "create_ice_creams:coned_watermelon_fusion_ice_cream",
  // Mystery
  "create_ice_creams:coned_mystery_ice_crem",
  "create_ice_creams:coned_mystery_ice_cream",
  "create_ice_creams:coned_mystery_ice_craem",
  "create_ice_creams:coned_mystery_ice_cram",
];

const iceCreamComponents = [
  "create_ice_creams:vanilla",
  "create_ice_creams:chocolate_cream",
  "create_ice_creams:toffee_cream",
  "create_ice_creams:bubblegum_flavored_cream",
  "create_ice_creams:mint_cream",
  "create_ice_creams:mystery_cream",
  "create_ice_creams:watermelon_cream",
  "create_ice_creams:cone",
];

ItemEvents.modification((event) => {
  iceCreams.map((iceCream) => {
    event.modify(iceCream, (item) => {
      item.foodProperties = (food) => {
        if (iceCream.includes("sweet_berries")) {
          food.hunger(3);
        } else if (iceCream.includes("glow_berries")) {
          food.hunger(3);
        } else if (iceCream.includes("chorus_fruit_berries")) {
          food.hunger(4);
        } else if (iceCream.includes("carrot")) {
          food.hunger(4);
        } else if (iceCream.includes("fusion")) {
          food.hunger(7);
        } else {
          food.hunger(2);
        }
        food.saturation(0.5);
      };
    });
  });

  iceCreamComponents.map((component) => {
    event.modify(component, (item) => {
      item.foodProperties = (food) => {
        food.hunger(1);
        food.saturation(0.25);
      };
    });
  });
});
