ServerEvents.tags('item', event => {
  event.add('minecraft:swords', 'cataclysm:black_steel_sword')
  event.remove('minecraft:swords', 'cataclysm:the_incinerator')
  event.remove('c:swords', 'cataclysm:the_incinerator')
  event.remove('forge:tools/swords', 'cataclysm:the_incinerator')
  event.remove('minecraft:swords', 'cataclysm:athame')
  event.remove('c:swords', 'cataclysm:athame')
  event.remove('forge:tools/swords', 'cataclysm:athame')
  event.remove('minecraft:swords', 'irons_spellbooks:twilight_gale')
  event.remove('forge:tools/swords', "savage_and_ravage:cleaver_of_beheading")
  event.add('farmersdelight:tools/knives', [
    'spartanweaponry:stone_dagger',
    'spartanweaponry:iron_dagger',
    'spartanweaponry:steel_dagger',
    'spartanweaponry:netherite_dagger'
  ])
  event.add('spartanweaponry:longswords', 'magistuarmoryaddon:steel_feder')
  event.add('fantasia:coal_recipe', ['spelunkery:coal_lump', 'spelunkery:charcoal_lump'])
  event.add('fantasia:compass', ['spelunkery:magnetic_compass', 'minecraft:compass'])
  event.add('minecraft:compasses', 'spelunkery:magnetic_compass')
  event.add('minecraft:compasses', 'irons_spellbooks:wayward_compass')
  event.add('forge:potions', 'medieval_healing:herbal_tonic')
  event.add('quark:seed_pouch_holdable', 'coinsje:gold_coin')
  event.add('quark:seed_pouch_holdable', 'irons_spellbooks:arcane_essence')
  event.remove('forge:nuggets/steel', 'magistuarmory:steel_nugget')
  event.remove('forge:salt', 'hearthandharvest:salt')
  event.remove('forge:salts', 'hearthandharvest:salt')
  event.remove('supplementaries:ropes', ['quark:rope', 'farmersdelight:rope'])
  event.remove('minecraft:oak_logs', 'regions_unexplored:small_oak_log')
  event.add('fantasia:silver_ores', ['galosphere:silver_ore', 'galosphere:deepslate_silver_ore'])
  event.add('overgeared:hot_items', ['minecraft:lava_bucket', 'kubejs:netherite_alloy', 'kubejs:unfinished_netherite_ingot'])
  event.add('c:villager_job_sites', ['sawmill:sawmill', 'easel_does_it:easel'])
  event.add('fantasiia:wagons', ['trotting_wagons:armored_wagon', 'trotting_wagons:conestoga_wagon', 'trotting_wagons:royal_wagon'])
  event.add('miningmaster:gems', ['kubejs:alluring_sunstone', 'kubejs:nimble_spinel', 'kubejs:rectifying_moonstone', 'kubejs:scornful_bloodstone', 'kubejs:tranquil_pearl', 'kubejs:vengeful_onyx', 'minecraft:echo_shard'])
  event.add('savage_and_ravage:explosion_immune', [
    'endrem:rogue_eye',
    'endrem:nether_eye',
    'endrem:cold_eye',
    'endrem:magical_eye'
  ])
  event.remove('spartanweaponry:steel_weapons', [
    'spartanweaponry:steel_quarterstaff',
    'spartanweaponry:steel_longbow',
    'spartanweaponry:steel_heavy_crossbow',
    'spartanweaponry:steel_boomerang'
  ])
  event.remove('spartanweaponry:iron_weapons', [
    'spartanweaponry:iron_quarterstaff',
    'spartanweaponry:iron_longbow',
    'spartanweaponry:iron_heavy_crossbow',
    'spartanweaponry:iron_boomerang'
  ])
  event.remove('spartanweaponry:golden_weapons', [
    'spartanweaponry:golden_quarterstaff',
    'spartanweaponry:golden_longbow',
    'spartanweaponry:golden_heavy_crossbow',
    'spartanweaponry:golden_boomerang'
  ])
  event.remove('spartanweaponry:netherite_weapons', [
    'spartanweaponry:netherite_quarterstaff',
    'spartanweaponry:netherite_longbow',
    'spartanweaponry:netherite_heavy_crossbow',
    'spartanweaponry:netherite_boomerang'
  ])
  event.remove('minecraft:trim_materials', 'regions_unexplored:prismarite_cluster')
  event.add('overgeared:smithing_hammers', 'kubejs:stone_smithing_hammer')
  event.add('minecraft:pickaxes', 'cataclysm:black_steel_pickaxe')
  event.add('minecraft:axes', 'cataclysm:black_steel_axe')
  event.add('minecraft:shovels', 'cataclysm:black_steel_shovel')
  event.add('minecraft:hoes', 'cataclysm:black_steel_hoe')
  event.add('miningmaster:gems', 'kubejs:soul_labradorite')
  event.add('fantasia:casters', ['irons_spellbooks:blood_staff', 'irons_spellbooks:graybeard_staff', 'irons_spellbooks:ice_staff', 'irons_spellbooks:artificer_cane', 'irons_spellbooks:lightning_rod', 'kubejs:blessed_crucifix', 'kubejs:ashen_lamp', 'kubejs:doctors_cane', 'kubejs:emerald_wonder', 'kubejs:voidpiercer'])

  event.add('forge:excavators', 'kubejs:steel_excavator')
  event.add('forge:hammers', 'kubejs:steel_hammer')

  event.add('farmersdelight:tools/knives', 'kubejs:steel_knife')
  event.add('forge:tools/knives', 'kubejs:steel_knife')

  event.add('farmersdelight:tools/knives', 'kubejs:steel_cleaver')
  event.add('forge:tools/knives', 'kubejs:steel_cleaver')
  event.add('hearthandharvest:cleavers', 'kubejs:steel_cleaver')

  event.add('overgeared:heated_metals', 'kubejs:heated_silver_ingot')

  event.add('overgeared:heated_metals', 'kubejs:heated_diamond_alloy')

  event.add('overgeared:heated_metals', 'kubejs:heated_diamond_ingot')

  event.add('overgeared:heated_metals', 'kubejs:heated_iron_plate')

  event.add('overgeared:heated_metals', 'kubejs:heated_steel_plate')

  event.add('overgeared:heated_metals', 'kubejs:heated_diamond_plate')

  event.add('forge:ingots/diamond', 'kubejs:diamond_ingot')
  event.add('minecraft:hoes', 'spartanweaponry:iron_scythe')

  event.add('spartanweaponry:oilable_weapons', ['overgeared:steel_sword', 'cataclysm:black_steel_sword'])
  
  event.add('spartanweaponry:longswords', ["kubejs:wooden_longsword_two_handed", "kubejs:iron_longsword_two_handed", "kubejs:steel_longsword_two_handed", "kubejs:golden_longsword_two_handed", "kubejs:diamond_longsword_two_handed", "kubejs:netherite_longsword_two_handed"])

  event.add('spartanweaponry:katanas', ["kubejs:wooden_katana_two_handed", "kubejs:iron_katana_two_handed", "kubejs:steel_katana_two_handed", "kubejs:diamond_katana_two_handed", "kubejs:netherite_katana_two_handed"])

  event.add('spartanweaponry:greatswords', ["kubejs:wooden_greatsword_two_handed", "kubejs:iron_greatsword_two_handed", "kubejs:steel_greatsword_two_handed", "kubejs:golden_greatsword_two_handed", "kubejs:diamond_greatsword_two_handed", "kubejs:netherite_greatsword_two_handed"])

  event.add('spartanweaponry:warhammers', ["kubejs:wooden_warhammer_two_handed", "kubejs:iron_warhammer_two_handed", "kubejs:steel_warhammer_two_handed", "kubejs:diamond_warhammer_two_handed", "kubejs:netherite_warhammer_two_handed"])

  event.add('forge:bundles', '#silly_oddities:bundles')

  event.add('environmental:deer_tempt_items', 'hearthandharvest:cherry')
  event.add('environmental:deer_food', 'hearthandharvest:cherry')

  event.add('farmersdelight:straw_harvesters', 'spartanweaponry:iron_scythe')
  
  event.add('fantasia:ingots/black_steel', 'cataclysm:black_steel_ingot')

  event.add('supplementaries:overencumbering', ['#minecraft:shulker_boxes', 'monobank:monobank'])

  event.add('fantasia:copper_toolheads', ["overgeared:copper_hammer_head", "overgeared:copper_sword_blade", "overgeared:copper_pickaxe_head", "overgeared:copper_axe_head", "overgeared:copper_shovel_head", "overgeared:copper_hoe_head"])

  event.add('fantasia:iron_toolheads', ["kubejs:iron_hammer_head", "kubejs:iron_excavator_head", "kubejs:iron_cleaver_blade", "kubejs:iron_spearhead", "kubejs:iron_curved_blade", "kubejs:iron_longsword_blade", "kubejs:iron_blade", "kubejs:iron_greatsword_blade", "kubejs:iron_battle_hammer_head", "kubejs:iron_battleaxe_head", "kubejs:iron_flanged_mace_head", "kubejs:iron_halberd_head", "kubejs:iron_warhammer_head", "overgeared:iron_tong", "overgeared:iron_sword_blade", "overgeared:iron_pickaxe_head", "overgeared:iron_axe_head", "overgeared:iron_shovel_head", "overgeared:iron_hoe_head"])

  event.add('fantasia:steel_toolheads', ["kubejs:steel_hammer_head", "kubejs:steel_excavator_head", "kubejs:steel_cleaver_blade", "kubejs:steel_spearhead", "kubejs:steel_curved_blade", "kubejs:steel_longsword_blade", "kubejs:steel_greatsword_blade", "kubejs:steel_battle_hammer_head", "kubejs:steel_battleaxe_head", "kubejs:steel_flanged_mace_head", "kubejs:steel_halberd_head", "kubejs:steel_warhammer_head", "kubejs:steel_blade", "overgeared:steel_tong", "overgeared:steel_hammer_head", "overgeared:steel_sword_blade", "overgeared:steel_pickaxe_head", "overgeared:steel_axe_head", "overgeared:steel_shovel_head", "overgeared:steel_hoe_head"])

  event.add('fantasia:diamond_toolheads', ["kubejs:diamond_sword_blade", "kubejs:diamond_pickaxe_head", "kubejs:diamond_axe_head", "kubejs:diamond_shovel_head", "kubejs:diamond_hoe_head", "kubejs:diamond_hammer_head", "kubejs:diamond_excavator_head", "kubejs:diamond_cleaver_blade", "kubejs:diamond_spearhead", "kubejs:diamond_curved_blade", "kubejs:diamond_longsword_blade", "kubejs:diamond_greatsword_blade", "kubejs:diamond_battle_hammer_head", "kubejs:diamond_battleaxe_head", "kubejs:diamond_flanged_mace_head", "kubejs:diamond_halberd_head", "kubejs:diamond_warhammer_head", "kubejs:diamond_blade"])

  event.add('overgeared:quality_blacklist', ["alexsmobs:unsettling_kimono", "kubejs:wrought_axe", "chalk:pink_chalk", "chalk:blue_chalk", "chalk:green_chalk", "chalk:red_chalk", "chalk:purple_chalk", "chalk:lime_chalk", "chalk:white_chalk", "chalk:light_gray_chalk", "chalk:black_chalk", "chalk:yellow_chalk", "chalk:brown_chalk", "chalk:gray_chalk", "chalk:light_blue_chalk", "chalk:magenta_chalk", "chalk:orange_chalk", "chalk:cyan_chalk"])

  event.add('alexsmobsdelight:wild_stew_ingredients', 'environmental:venison')
  
  event.add('hexerei:mahogany_logs', ['hexerei:mahogany_log', 'hexerei:mahogany_wood', 'hexerei:stripped_mahogany_log', 'hexerei:stripped_mahogany_wood'])

  event.add('hexerei:willow_logs', ['hexerei:willow_log', 'hexerei:willow_wood', 'hexerei:stripped_willow_log', 'hexerei:stripped_willow_wood'])

  event.add('hexerei:witch_hazel_logs', ['hexerei:witch_hazel_log', 'hexerei:witch_hazel_wood', 'hexerei:stripped_witch_hazel_wood', 'hexerei:stripped_witch_hazel_log'])
});

ServerEvents.tags('block', event => {

  let moddedLogs = [
    "quark:ancient",
    "quark:azalea",
    "quark:blossom",
    "environmental:wisteria",
    "environmental:plum",
    "windswept:holly",
    "windswept:chestnut",
    "windswept:pine"
  ]

  moddedLogs.forEach(log => {
    event.add('regions_unexplored:branches_can_survive_on', `${log}_log`)
  })


  event.add('minecraft:mineable/pickaxe', ['alloy_smelter:forge_controller_tier1', 'alloy_smelter:forge_controller_tier2'])
  event.add('overgeared:needs_steel_tool', ['minecraft:respawn_anchor', 'irons_spellbooks:armor_pile'])
  event.remove('minecraft:needs_diamond_tool', ['minecraft:respawn_anchor', 'irons_spellbooks:armor_pile'])
  event.remove('minecraft:needs_stone_tool', ['spelunkery:andesite_iron_ore', 'spelunkery:diorite_iron_ore', 'spelunkery:granite_iron_ore', 'spelunkery:tuff_iron_ore'])
  event.add('overgeared:needs_copper_tool', ['spelunkery:andesite_iron_ore', 'spelunkery:diorite_iron_ore', 'spelunkery:granite_iron_ore', 'spelunkery:tuff_iron_ore'])
  event.add('minecraft:needs_diamond_tool', 'irons_spellbooks:arcane_debris')
  event.remove('forge:needs_netherite_tool', 'irons_spellbooks:arcane_debris')
  event.add('spelunkery:chisel_immune', 'minecraft:respawn_anchor')
  event.add('hearthandharvest:tappable', 'regions_unexplored:maple_log')
  event.add('hearthandharvest:tappable', 'minecraft:birch_log')
  event.remove('forge:needs_netherite_tool', ['irons_spellbooks:mithril_ore', 'irons_spellbooks:deepslate_mithril_ore'])
  event.add('minecraft:needs_diamond_tool', ['irons_spellbooks:mithril_ore', 'irons_spellbooks:deepslate_mithril_ore'])
});