// priority: 0
console.info("[SOCIETY] handleTags.js loaded");

ServerEvents.tags("item", (e) => {
  const stripTags = [
    "vintagedelight:cheese_wheel",
    "vintagedelight:oat_dough",
    "vintagedelight:oat_seeds",
    "vintagedelight:raw_oats",
    "vintagedelight:salt_dust",
    "vintagedelight:cheese_curds",
    "vintagedelight:cheese_slice",
    "vintagedelight:wild_oats",
    "vintagedelight:oat",
    "vintagedelight:oat_bag",
    "farm_and_charm:chicken_parts",
    "farmersdelight:carrot_crate",
    "farmersdelight:rich_soil",
    "farm_and_charm:bacon",
    "farmersdelight:onion",
    "farm_and_charm:tomato_seeds",
    "farm_and_charm:rotten_tomato",
    "farm_and_charm:tomato",
    "farmersdelight:organic_compost",
    "farmersdelight:wild_cabbages",
    "farmersdelight:wild_beetroots",
    "farmersdelight:rich_soil_farmland",
    "farmersdelight:wild_onions",
    "farmersdelight:tomato_seeds",
    "farmersdelight:raw_pasta",
    "farmersdelight:wild_rice",
    "farmersdelight:bacon_and_eggs",
    "farmersdelight:wild_carrots",
    "farmersdelight:dog_food",
    "farmersdelight:horse_feed",
    "farmersdelight:wild_potatoes",
    "farmersdelight:cabbage_crate",
    "farmersdelight:tomato_crate",
    "farmersdelight:beetroot_crate",
    "farmersdelight:onion_crate",
    "farmersdelight:potato_crate",
    "farmersdelight:wheat_dough",
    "create:dough",
    "autumnity:syrup_bottle",
    "candlelight:mozzarella",
    "quark:rope",
    "brewery:hops_seeds",
    "farm_and_charm:strawberry_seed",
    "pamhc2trees:orangeitem",
  ];
  stripTags.forEach((item) => {
    e.removeAllTagsFrom(item);
  });
});

ServerEvents.tags("item", (e) => {
  // Misc tags
  e.add("forge:crops", "society:ancient_fruit");
  e.add("meadow:water_bottles", "herbalbrews:water_cup");
  e.add("farm_and_charm:water_bottles", "herbalbrews:water_cup");
  e.add("forge:water_bottles", "herbalbrews:water_cup");
  e.add("forge:food/raw_pasta", "farm_and_charm:raw_pasta");
  e.add("forge:salad_ingredients", "farm_and_charm:lettuce");
  e.add("forge:grain/corn", "farm_and_charm:corn");
  e.add("candlelight:butter", "farm_and_charm:butter");
  e.add("netherdepthsupgrade:lava_fishing_rod", "forge:tools/fishing_rods");
  e.add("forge:rope", "brewery:rope");
  e.remove("candlelight:red_effect", "minecraft:potion");
  e.remove("candlelight:white_effect", "minecraft:potion");
  e.remove("candlelight:all_effects", "minecraft:potion");
  // Tag tags
  e.add("forge:food/cheese", "#forge:foods/cheese");
  e.add("forge:food/pastas", "#forge:foods/pastas");
  e.add("letsdo_addon_compat:tools/knives", "#forge:tools/knives");
  // Milk
  const bakeryMilks = [
    "minecraft:milk_bucket",
    "meadow:wooden_milk_bucket",
    "meadow:wooden_grain_milk_bucket",
  ];
  bakeryMilks.forEach((milk) => {
    e.add("bakery:milk", milk);
  });
  e.add("forge:milks", "meadow:wooden_grain_milk_bucket");
  e.add("farm_and_charm:milk", "meadow:wooden_grain_milk_bucket");
  // Bulk
  global.preserves.forEach((preserve) => {
    e.add("society:preserves", preserve.item);
  });
  global.agedRoe.forEach((preserve) => {
    e.add("society:aged_roe", preserve.item);
  });
  const rawLogs = [
    "quark:blossom_log",
    "quark:ancient_log",
    "quark:azalea_log",
    "minecraft:dark_oak_log",
    "minecraft:mangrove_log",
    "minecraft:spruce_log",
    "minecraft:acacia_log",
    "meadow:pine_log",
    "minecraft:oak_log",
    "minecraft:birch_log",
    "minecraft:jungle_log",
    "minecraft:cherry_log",
    "betterarcheology:rotten_log",
    "vinery:dark_cherry_log",
    "beachparty:palm_log",
    "vinery:apple_log",
    "autumnity:maple_log"
  ];
  rawLogs.forEach((log) => {
    e.add("society:raw_logs", log);
  });
  // Furniture
  global.lootFurniture.forEach((furniture) => {
    e.add("society:loot_furniture", furniture);
  });
  const mirrors = [
    "furniture:cherry_mirror",
    "furniture:mangrove_mirror",
    "furniture:dark_oak_mirror",
    "furniture:acacia_mirror",
    "furniture:spruce_mirror",
    "furniture:jungle_mirror",
    "furniture:oak_mirror",
    "furniture:birch_mirror",
  ];
  mirrors.forEach((mirror) => {
    e.add("society:mirrors", mirror);
  });
  // Geodes
  const geodeJunk = [
    "minecraft:granite",
    "minecraft:diorite",
    "minecraft:andesite",
    "minecraft:clay_ball",
    "aquaculture:tin_can",
  ];
  geodeJunk.forEach((geodeItem) => {
    e.add("society:geode_junk", geodeItem);
  });
  const geodeBonus = [
    "minecraft:raw_iron",
    "minecraft:raw_copper",
    "minecraft:coal",
  ];
  geodeBonus.forEach((geodeItem) => {
    e.add("society:geode_bonus", geodeItem);
  });
  global.geodeList.forEach((geodeItem) => {
    e.add("society:geode_treasure", geodeItem.item);
    e.add("society:omni_geode_treasure", geodeItem.item);
  });
  const geodeRelic = ["relics:horse_flute", "relics:hunter_belt"];
  geodeRelic.forEach((geodeItem) => {
    e.add("society:geode_relic", geodeItem);
  });
  // Frozen Geode
  const frozenGeodeBonus = [
    "minecraft:raw_iron",
    "minecraft:raw_copper",
    "minecraft:ice",
    "minecraft:raw_zinc",
    "minecraft:coal",
  ];
  frozenGeodeBonus.forEach((geodeItem) => {
    e.add("society:frozen_geode_bonus", geodeItem);
  });
  global.frozenGeodeList.forEach((geodeItem) => {
    e.add("society:frozen_geode_treasure", geodeItem.item);
    e.add("society:omni_geode_treasure", geodeItem.item);
  });
  const frozenGeodeRelic = ["relics:wool_mitten", "relics:ice_skates"];
  frozenGeodeRelic.forEach((geodeItem) => {
    e.add("society:frozen_geode_relic", geodeItem);
  });
  // Magma Geode
  const magmaGeodeBonus = [
    "minecraft:raw_iron",
    "minecraft:raw_copper",
    "minecraft:raw_gold",
    "minecraft:raw_zinc",
    "minecraft:clay_ball",
    "minecraft:coal",
  ];
  magmaGeodeBonus.forEach((geodeItem) => {
    e.add("society:magma_geode_bonus", geodeItem);
  });
  global.magmaGeodeList.forEach((geodeItem) => {
    e.add("society:magma_geode_treasure", geodeItem.item);
    e.add("society:omni_geode_treasure", geodeItem.item);
  });
  const magmaGeodeRelic = ["relics:bastion_ring", "relics:magma_walker"];
  magmaGeodeRelic.forEach((geodeItem) => {
    e.add("society:magma_geode_relic", geodeItem);
  });
  // Omni Geode
  const omniGeodeBonus = [
    "minecraft:raw_iron",
    "minecraft:raw_gold",
    "minecraft:raw_zinc",
    "minecraft:ancient_debris",
  ];
  omniGeodeBonus.forEach((geodeItem) => {
    e.add("society:omni_geode_bonus", geodeItem);
  });
  e.add("society:omni_geode_special", "society:prismatic_shard");

  global.cooking.forEach((meal) => {
    e.add("society:dish", meal.item);
  });
  // Relics
  const relics = [
    "relics:aqua_walker",
    "relics:amphibian_boot",
    "relics:arrow_quiver",
    "relics:bastion_ring",
    "relics:rage_glove",
    "relics:chorus_inhibitor",
    "relics:drowned_belt",
    "relics:elytra_booster",
    "relics:enders_hand",
    "relics:holy_locket",
    "relics:horse_flute",
    "relics:hunter_belt",
    "relics:ice_breaker",
    "relics:ice_skates",
    "relics:infinity_ham",
    "relics:jellyfish_necklace",
    "relics:leather_belt",
    "relics:magma_walker",
    "relics:midnight_robe",
    "relics:reflection_necklace",
    "relics:roller_skates",
    "relics:shadow_glaive",
    "relics:space_dissector",
    "relics:spatial_sign",
    "relics:spore_sack",
    "relics:wool_mitten",
  ];
  relics.forEach((relic) => e.add("society:relics", relic));

  ['aquaculture:jellyfish', 'aquaculture:goldfish', 'aquaculture:leech', 'society:neptuna'].forEach((fish) => e.add("minecraft:fish", fish))
  // Artifacts
  global.artifacts.forEach((artifact) => {
    e.add("society:artifacts", artifact.item);
  });
  // Furniture Workbench tags
  global.lootFurniture.forEach((item) => {
    if (item.includes("tanukidecor"))
      e.add("refurbished_furniture:outdoors", item);
    else e.add("refurbished_furniture:kitchen", item);
  });
  Ingredient.of("@fantasyfurniture").stacks.forEach((item) => {
    if (item.toString().includes("furniture_station")) return;
    e.add("refurbished_furniture:bathroom", item.id);
  });
  const yuushyaBlocks = [
    "yuushya:sign_blueprint",
    "yuushya:store_blueprint",
    "yuushya:living_being_blueprint",
    "yuushya:catering_blueprint",
    "yuushya:fabric_blueprint",
    "yuushya:stone_blueprint",
    "yuushya:wood_blueprint",
    "yuushya:block_blueprint",
    "yuushya:furniture_blueprint",
    "yuushya:lighting_blueprint",
    "yuushya:facility_blueprint",
    "yuushya:traffic_blueprint",
    "yuushya:extra_shapes_blueprint",
    "yuushya:window_blueprint",
    "yuushya:handrail_right",
    "yuushya:ladder",
    "yuushya:slippers",
    "yuushya:big_table",
    "yuushya:medium_table",
    "yuushya:average_table",
    "yuushya:half_side_slab",
    "yuushya:column",
    "yuushya:shelf",
    "yuushya:couch",
    "yuushya:half_slab",
    "yuushya:bookshelf",
    "yuushya:uncovered_shelf",
    "yuushya:leaning_ladder",
    "yuushya:foldable_ladder",
    "yuushya:clock",
    "yuushya:round_clock",
    "yuushya:park_bench_no_handrail",
    "yuushya:park_bench",
    "yuushya:bench",
    "yuushya:bucket",
    "yuushya:decorative_shelf",
    "yuushya:decoration_bookshelf",
    "yuushya:stick",
    "yuushya:pole",
    "yuushya:fence_corner",
    "yuushya:new_fence",
    "yuushya:hollow_stairs",
    "yuushya:handrail_left",
    "yuushya:frame_bottom",
    "yuushya:platform",
    "yuushya:horizontal_stick",
    "yuushya:frame_left",
    "yuushya:frame_right",
    "yuushya:skateboard",
    "yuushya:leaned_skateboard",
    "yuushya:park_stool",
    "yuushya:seat",
    "yuushya:cushion_armchair",
    "yuushya:chair",
    "yuushya:bar_stool",
    "yuushya:basket",
    "yuushya:white_bow_gift_box",
    "yuushya:black_bow_gift_box",
    "yuushya:white_bow_small_gift_box",
    "yuushya:black_bow_small_gift_box",
    "yuushya:rain_shed",
    "yuushya:lengthened_rain_shed",
    "yuushya:mounted_fern_pot",
    "yuushya:venetian_blinds",
    "yuushya:board",
    "yuushya:bottle_container",
    "yuushya:cart",
    "yuushya:handrail_middle",
    "yuushya:bicycle",
    "yuushya:post",
    "yuushya:frame_top",
    "yuushya:horizontal_pole",
    "yuushya:horizontal_post",
    "yuushya:horizontal_column",
    "yuushya:fence",
    "yuushya:new_fence",
    "yuushya:marble_bricks_0",
    "yuushya:dark_square_bricks",
    "yuushya:pale_bricks_0",
    "yuushya:mossy_bricks",
    "yuushya:marble_bricks_1",
    "yuushya:pale_bricks_2",
    "yuushya:square_brick",
    "yuushya:embbed_dark_bricks",
    "yuushya:yellow_worn_concrete",
    "yuushya:wore_stone",
    "yuushya:scarlet_tile",
    "yuushya:gray_tile",
    "yuushya:cut_tile",
    "yuushya:orange_worn_concrete",
    "yuushya:light_gray_worn_concrete",
    "yuushya:mink_worn_concrete",
    "yuushya:cream_worn_concrete",
    "yuushya:white_worn_concrete",
    "yuushya:stone_with_dot",
    "yuushya:wore_lime_wall",
    "yuushya:marble",
    "yuushya:gray_wall",
    "yuushya:embbed_pale_bricks",
    "yuushya:embbed_magenta_pale_bricks",
    "yuushya:smooth_marble",
    "yuushya:smooth_stonetile",
    "yuushya:smooth_sandtile",
    "yuushya:park_tile",
    "yuushya:fossilized_cobblestone",
    "yuushya:pale_bricks_3",
    "yuushya:smooth_dark_stonetile",
    "yuushya:pale_bricks_1",
    "yuushya:smoke_bricks",
    "yuushya:marble_cobblestone",
    "yuushya:egg_cobblestone",
    "yuushya:terracotta_cobblestone",
    "yuushya:pale_bricks",
    "yuushya:black_bricks",
    "yuushya:red_bricks",
    "yuushya:framed_bricks_alt",
    "yuushya:framed_bricks",
    "yuushya:top_reinforced_concrete",
    "yuushya:reinforced_concrete",
    "yuushya:embbed_stone_bricks",
    "yuushya:lime__concrete",
    "yuushya:embbed_marble_bricks",
    "yuushya:form_trans_item",
    "yuushya:falling_oak_spawner",
    "yuushya:falling_sakura_spawner",
    "yuushya:falling_maple_spawner",
    "yuushya:decorative_light_gray_wool",
    "yuushya:market_block_red",
    "yuushya:horizontal_chiseled_purple_acrylic_alt",
    "yuushya:vertical_chiseled_lime_acrylic_alt",
    "yuushya:a_yellow_horizontal_compact",
    "yuushya:wore_metal",
    "yuushya:horizontal_chiseled_yellow_acrylic",
    "yuushya:quartz_acrylic",
    "yuushya:a_purple_vertical_compact",
    "yuushya:blue_metal",
    "yuushya:red_framed_acrylic",
    "yuushya:b_metal_blindwall_0",
    "yuushya:b_metal_blindwall_1",
    "yuushya:familymart_acrylic_top",
    "yuushya:a_cyan_vertical_compact",
    "yuushya:a_blue_vertical_compact",
    "yuushya:b_white_vertical_compact",
    "yuushya:b_light_blue_vertical_compact",
    "yuushya:horizontal_chiseled_blue_acrylic_alt",
    "yuushya:b_lime_vertical_compact",
    "yuushya:decorative_magenta_wool_plain",
    "yuushya:b_light_blue_horizontal_compact",
    "yuushya:columned_sandstone_b",
    "yuushya:columned_sandstone_a",
    "yuushya:b_red_vertical_compact",
    "yuushya:tatami",
    "yuushya:decorative_cyan_wool",
    "yuushya:b_cyan_horizontal_compact",
    "yuushya:tatami_rotated",
    "yuushya:japanese_wall",
    "yuushya:b_purple_blindwall",
    "yuushya:warning_sign",
    "yuushya:a_light_gray_horizontal_compact",
    "yuushya:vertical_chiseled_blue_acrylic",
    "yuushya:market_block_light_gray",
    "yuushya:b_gray_blindwall",
    "yuushya:horizontal_chiseled_black_acrylic",
    "yuushya:horizontal_chiseled_light_blue_acrylic",
    "yuushya:decorative_light_blue_wool_plain",
    "yuushya:a_metal_blindwall_0",
    "yuushya:a_metal_blindwall_1",
    "yuushya:a_pink_vertical_compact",
    "yuushya:vertical_chiseled_black_acrylic_alt",
    "yuushya:horizontal_chiseled_lime_acrylic",
    "yuushya:decorative_white_wool",
    "yuushya:b_yellow_blindwall",
    "yuushya:a_green_blindwall",
    "yuushya:b_black_blindwall",
    "yuushya:a_gray_blindwall",
    "yuushya:purple_acrylic",
    "yuushya:lime_framed_acrylic_alt",
    "yuushya:vertical_chiseled_lime_acrylic",
    "yuushya:a_black_horizontal_compact",
    "yuushya:a_magenta_blindwall",
    "yuushya:decorative_brown_wool",
    "yuushya:b_gray_horizontal_compact",
    "yuushya:lime_framed_acrylic",
    "yuushya:horizontal_chiseled_yellow_acrylic_alt",
    "yuushya:a_light_gray_vertical_compact",
    "yuushya:a_blue_blindwall",
    "yuushya:lime_concrete_top",
    "yuushya:orange_acrylic",
    "yuushya:black_framed_acrylic_alt",
    "yuushya:a_blue_horizontal_compact",
    "yuushya:a_white_blindwall",
    "yuushya:decorative_red_wool_plain",
    "yuushya:red_concrete_top",
    "yuushya:b_orange_horizontal_compact",
    "yuushya:a_red_blindwall",
    "yuushya:purple_framed_acrylic_alt",
    "yuushya:decorative_purple_wool_plain",
    "yuushya:b_light_gray_vertical_compact",
    "yuushya:horizontal_chiseled_blue_acrylic",
    "yuushya:light_gray_concrete_top",
    "yuushya:decorative_yellow_wool",
    "yuushya:horizontal_chiseled_lime_acrylic_alt",
    "yuushya:a_red_vertical_compact",
    "yuushya:decorative_orange_wool",
    "yuushya:a_white_vertical_compact",
    "yuushya:b_yellow_vertical_compact",
    "yuushya:green_concrete_top",
    "yuushya:b_magenta_horizontal_compact",
    "yuushya:decorative_green_wool_plain",
    "yuushya:gray_concrete_top",
    "yuushya:a_gray_horizontal_compact",
    "yuushya:a_pink_blindwall",
    "yuushya:light_blue_concrete_top",
    "yuushya:pink_concrete_top",
    "yuushya:vertical_chiseled_yellow_acrylic_alt",
    "yuushya:a_black_vertical_compact",
    "yuushya:green_acrylic",
    "yuushya:light_blue_framed_acrylic",
    "yuushya:b_green_horizontal_compact",
    "yuushya:a_lime_horizontal_compact",
    "yuushya:gray_acrylic",
    "yuushya:a_magenta_vertical_compact",
    "yuushya:blue_concrete_top",
    "yuushya:black_concrete_top",
    "yuushya:decorative_yellow_wool_plain",
    "yuushya:light_blue_framed_acrylic_alt",
    "yuushya:white_concrete_top",
    "yuushya:a_light_gray_blindwall",
    "yuushya:a_brown_blindwall",
    "yuushya:market_block_mixed",
    "yuushya:market_block_purple",
    "yuushya:magenta_acrylic",
    "yuushya:a_magenta_horizontal_compact",
    "yuushya:market_block_blue",
    "yuushya:decorative_black_wool_plain",
    "yuushya:a_pink_horizontal_compact",
    "yuushya:a_purple_blindwall",
    "yuushya:b_brown_horizontal_compact",
    "yuushya:decorative_gray_wool_plain",
    "yuushya:horizontal_chiseled_red_acrylic",
    "yuushya:b_black_vertical_compact",
    "yuushya:market_block_brown",
    "yuushya:decorative_orange_wool_plain",
    "yuushya:b_light_gray_horizontal_compact",
    "yuushya:red_framed_acrylic_alt",
    "yuushya:horizontal_chiseled_red_acrylic_alt",
    "yuushya:vertical_chiseled_black_acrylic",
    "yuushya:a_purple_horizontal_compact",
    "yuushya:lime_acrylic",
    "yuushya:b_purple_vertical_compact",
    "yuushya:a_light_blue_vertical_compact",
    "yuushya:b_red_horizontal_compact",
    "yuushya:vertical_chiseled_purple_acrylic_alt",
    "yuushya:a_cyan_blindwall",
    "yuushya:decorative_gray_wool",
    "yuushya:sandstone_acrylic",
    "yuushya:b_orange_blindwall",
    "yuushya:a_white_horizontal_compact",
    "yuushya:vertical_chiseled_red_acrylic",
    "yuushya:yellow_acrylic",
    "yuushya:b_light_blue_blindwall",
    "yuushya:brown_concrete_top",
    "yuushya:yellow_concrete_top",
    "yuushya:white_acrylic",
    "yuushya:b_magenta_blindwall",
    "yuushya:pink_acrylic",
    "yuushya:b_lime_blindwall",
    "yuushya:straw_mat_a",
    "yuushya:straw_mat_b",
    "yuushya:b_gray_vertical_compact",
    "yuushya:red_acrylic",
    "yuushya:vertical_chiseled_light_blue_acrylic_alt",
    "yuushya:cyan_concrete_top",
    "yuushya:vertical_chiseled_red_acrylic_alt",
    "yuushya:grass",
    "yuushya:b_cyan_blindwall",
    "yuushya:b_cyan_vertical_compact",
    "yuushya:decorative_black_wool",
    "yuushya:decorative_pink_wool_plain",
    "yuushya:blue_acrylic",
    "yuushya:a_lime_blindwall",
    "yuushya:b_yellow_horizontal_compact",
    "yuushya:decorative_brown_wool_plain",
    "yuushya:horizontal_chiseled_light_blue_acrylic_alt",
    "yuushya:a_cyan_horizontal_compact",
    "yuushya:light_gray_acrylic",
    "yuushya:decorative_purple_wool",
    "yuushya:b_orange_vertical_compact",
    "yuushya:a_gray_vertical_compact",
    "yuushya:b_pink_vertical_compact",
    "yuushya:yellow_framed_acrylic_alt",
    "yuushya:b_green_blindwall",
    "yuushya:black_framed_acrylic",
    "yuushya:purple_framed_acrylic",
    "yuushya:decorative_lime_wool",
    "yuushya:light_blue_acrylic",
    "yuushya:decorative_light_gray_wool_plain",
    "yuushya:blue_framed_acrylic_alt",
    "yuushya:a_brown_vertical_compact",
    "yuushya:cyan_acrylic",
    "yuushya:decorative_blue_wool_plain",
    "yuushya:purple_concrete_top",
    "yuushya:b_blue_blindwall",
    "yuushya:a_orange_blindwall",
    "yuushya:b_light_gray_blindwall",
    "yuushya:a_black_blindwall",
    "yuushya:a_yellow_vertical_compact",
    "yuushya:vertical_chiseled_yellow_acrylic",
    "yuushya:decorative_red_wool",
    "yuushya:b_white_horizontal_compact",
    "yuushya:decorative_green_wool",
    "yuushya:b_lime_horizontal_compact",
    "yuushya:brown_acrylic",
    "yuushya:a_orange_vertical_compact",
    "yuushya:magenta_concrete_top",
    "yuushya:decorative_blue_wool",
    "yuushya:a_brown_horizontal_compact",
    "yuushya:b_magenta_vertical_compact",
    "yuushya:b_pink_horizontal_compact",
    "yuushya:a_green_vertical_compact",
    "yuushya:a_yellow_blindwall",
    "yuushya:b_pink_blindwall",
    "yuushya:a_green_horizontal_compact",
    "yuushya:decorative_pink_wool",
    "yuushya:colorful_acrylic",
    "yuushya:b_brown_blindwall",
    "yuushya:a_light_blue_horizontal_compact",
    "yuushya:b_purple_horizontal_compact",
    "yuushya:decorative_cyan_wool_plain",
    "yuushya:a_light_blue_blindwall",
    "yuushya:blue_framed_acrylic",
    "yuushya:a_red_horizontal_compact",
    "yuushya:decorative_light_blue_wool",
    "yuushya:vertical_chiseled_purple_acrylic",
    "yuushya:tree_base",
    "yuushya:a_orange_horizontal_compact",
    "yuushya:horizontal_chiseled_black_acrylic_alt",
    "yuushya:market_block_green",
    "yuushya:b_brown_vertical_compact",
    "yuushya:decorative_white_wool_plain",
    "yuushya:b_blue_vertical_compact",
    "yuushya:vertical_chiseled_light_blue_acrylic",
    "yuushya:black_acrylic",
    "yuushya:b_green_vertical_compact",
    "yuushya:b_white_blindwall",
    "yuushya:orange_concrete_top",
    "yuushya:b_black_horizontal_compact",
    "yuushya:yellow_framed_acrylic",
    "yuushya:a_lime_vertical_compact",
    "yuushya:vertical_chiseled_blue_acrylic_alt",
    "yuushya:b_red_blindwall",
    "yuushya:decorative_lime_wool_plain",
    "yuushya:b_blue_horizontal_compact",
    "yuushya:familymart_acrylic_bottom",
    "yuushya:decorative_magenta_wool",
    "yuushya:horizontal_chiseled_purple_acrylic",
  ];
  yuushyaBlocks.forEach((item) => {
    e.add("refurbished_furniture:electronics", item);
  });
  const smallMilks = [
    "society:milk",
    "society:goat_milk",
    "society:sheep_milk",
    "society:buffalo_milk",
    "society:warped_milk",
  ];
  smallMilks.forEach((item) => {
    e.add("society:small_milk", item);
  });
  const largeMilks = [
    "society:large_milk",
    "society:large_goat_milk",
    "society:large_buffalo_milk",
    "society:large_sheep_milk",
    "society:large_warped_milk",
  ];
  largeMilks.forEach((item) => {
    e.add("society:large_milk", item);
  });
});

ServerEvents.tags("block", (e) => {
  e.add("sturdy_farmland:weak_fertilizer", "minecraft:gold_block");
  e.add("sturdy_farmland:strong_fertilizer", "minecraft:diamond_block");
  e.add("sturdy_farmland:hydrating_fertilizer", "minecraft:lapis_block");
  const buildingGadgetsDeny = [
    "society:aging_cask",
    "society:ancient_cask",
    "society:charging_rod",
    "society:coin_leaderboard",
    "society:deluxe_worm_farm",
    "society:fish_pond",
    "society:loom",
    "society:crystalarium",
    "society:espresso_machine",
    "society:fish_smoker",
    "society:mayonnaise_machine",
    "society:preserves_jar",
    "society:prize_machine",
    "society:seed_maker",
  ];
  buildingGadgetsDeny.forEach((block) => {
    e.add("buildinggadgets2:deny", block);
  });
  e.remove("minecraft:dirt", "farmersdelight:rich_soil");
  const rawLogs = [
    "quark:blossom_log",
    "quark:ancient_log",
    "quark:azalea_log",
    "minecraft:dark_oak_log",
    "minecraft:mangrove_log",
    "minecraft:spruce_log",
    "minecraft:acacia_log",
    "meadow:pine_log",
    "minecraft:oak_log",
    "minecraft:birch_log",
    "minecraft:jungle_log",
    "minecraft:cherry_log",
    "betterarcheology:rotten_log",
    "vinery:dark_cherry_log",
    "beachparty:palm_log",
    "vinery:apple_log",
  ];
  rawLogs.forEach((log) => {
    e.add("society:raw_logs", log);
  });
  const flowersMissingBlockTags = [
    "meadow:eriophorum_tall",
    "meadow:alpine_poppy",
    "meadow:delphinium",
    "meadow:saxifrage",
    "meadow:enzian",
    "meadow:fire_lily",
    "meadow:eriophorum",
    "meadow:small_fir",
  ];
  flowersMissingBlockTags.forEach((flower) => {
    e.add("minecraft:flowers", flower);
    e.add(
      flower !== "meadow:eriophorum_tall"
        ? "minecraft:small_flowers"
        : "minecraft:tall_flowers",
      flower
    );
  });
  // Sails
  e.remove("create:windmill_sails", "#minecraft:wool");
});

ServerEvents.tags("worldgen/biome", (e) => {
  e.add("society:mining_biomes", "#minecraft:is_overworld");
  e.add("society:spawns_magma_geodes", "#minecraft:is_nether");
  e.add("forge:is_snowy", "mining_dimension:frozen_caves");
  const magmaGeodeBiomes = [
    "mining_dimension:blackstone_caves",
    "mining_dimension:desert_caves",
  ];
  magmaGeodeBiomes.forEach((biome) => {
    e.add("society:spawns_magma_geodes", biome);
  });
  const cavernBiomes = [
    "mining_dimension:blackstone_caves",
    "mining_dimension:mining",
    "mining_dimension:frozen_caves",
    "mining_dimension:lush_caverns",
    "mining_dimension:desert_caves",
  ];
  cavernBiomes.forEach((biome) => {
    e.add("society:is_skull_cavern", biome);
    e.add("supplementaries:has_cave_urns", biome);
    e.add("society:mining_biomes", biome);
  });
});

ServerEvents.tags("fluid", (e) => {
  e.removeAllTagsFrom("minecraft:milk");
  e.remove("forge:milk", "minecraft:milk");
  e.remove("minecraft:milk", "minecraft:milk");
});
