ServerEvents.tags('item', event => {
  event.add('minecraft:boats', /byg:\w+?_boat/)
  event.add('minecraft:chest_boats', /byg:.+?_chest_boat/)
  event.add('forge:cheese', '#forge:cheeses')
  event.add('forge:dusts/iron', 'create:crushed_raw_iron')
  event.add('forge:dusts/gold', 'create:crushed_raw_gold')
  event.add('forge:dusts/copper', 'create:crushed_raw_copper')
  event.add('forge:dusts/zinc', 'create:crushed_raw_zinc')
  event.add('forge:dusts/osmium', 'create:crushed_raw_osmium')
  event.add('forge:dusts/platinum', 'create:crushed_raw_platinum')
  event.add('forge:dusts/silver', 'create:crushed_raw_silver')
  event.add('forge:dusts/tin', 'create:crushed_raw_tin')
  event.add('forge:dusts/lead', 'create:crushed_raw_lead')
  event.add('forge:dusts/aluminum', 'create:crushed_raw_aluminum')
  event.add('forge:dusts/uranium', 'create:crushed_raw_uranium')
  event.add('forge:dusts/nickel', 'create:crushed_raw_nickel')
  event.add('forge:dusts/dark', 'evilcraft:dark_gem_crushed')
  event.add('forge:gems/dark', 'evilcraft:dark_gem')
  event.add('forge:dusts/ender', 'ae2:ender_dust')
  event.add('forge:sandstone/venus_sandstone', 'ad_astra:venus_sandstone')
  event.add('ars_nouveau:golem/shard', 'minecraft:amethyst_shard')
  event.add('forge:raw_materials', ['silentgear:raw_azure_silver', 'silentgear:raw_crimson_iron'])
  event.remove('forge:raw_materials', 'alexscaves:uranium')
  event.remove('forge:raw_materials/uranium', 'alexscaves:uranium')
  event.remove('forge:gems/uranium', 'alexscaves:uranium')
  event.remove('forge:dusts/yellorium', 'bigreactors:yellorium_dust')
  event.remove('elementalcraft:pure_ores/sources/raw_materials', 'alexscaves:uranium')
  event.add('forge:ingots/uranium', ['alexscaves:uranium', 'bigreactors:yellorium_ingot'])
  event.add('forge:nuggets/uranium', 'bigreactors:yellorium_nugget')
  event.add('forge:storage_blocks/uranium', 'bigreactors:yellorium_block')
  event.add('forge:ores', 'alexscaves:radrock_uranium_ore')
  event.add('forge:workbench', 'craftingstation:crafting_station')
  event.add('mysticalagriculture:essences', [
    'mysticalagriculture:allthemodium_essence',
    'mysticalagriculture:azure_silver_essence',
    'mysticalagriculture:crimson_iron_essence',
    'mysticalagriculture:unobtainium_essence',
    'mysticalagriculture:vibranium_essence',
  ])

  event.add('mysticalagriculture:seeds', [
    'mysticalagriculture:allthemodium_seeds',
    'mysticalagriculture:azure_silver_seeds',
    'mysticalagriculture:crimson_iron_seeds',
    'mysticalagriculture:unobtainium_seeds',
    'mysticalagriculture:vibranium_seeds',
  ])
  
  event.add('forge:dusts', 'alltheores:netherite_dust')
  event.add('forge:heads', 'enderio:enderman_head')
  event.add('forge:soul_sand', ['minecraft:soul_sand', 'minecraft:soul_soil'])
  event.add('forge:dusts/netherite', 'alltheores:netherite_dust')
  event.add('thermal:crafting/dies', 'immersiveengineering:mold_rod','immersiveengineering:mold_plate','immersiveengineering:mold_gear','immersiveengineering:mold_wire')
  
  //Fix Mythicbotany tags
  event.add('forge:raw_materials/elementium', 'mythicbotany:raw_elementium')
  event.add('forge:storage_blocks/raw_elementium', 'mythicbotany:raw_elementium_block')
  event.remove('pneumaticcraft:upgrade_components', 'minecraft:lapis_lazuli')
  event.remove('aether:aether_portal_activation_items', 'minecraft:water_bucket')
  event.removeAll('apotheosis:boon_drops')
  event.add('forge:bones/wither', 'bhc:wither_bone')
  event.removeAll('justdirethings:goo_revive_tier_2')
  event.add('justdirethings:goo_revive_tier_2', 'create:blaze_cake')

  //Blood Magic Orbs
  event.add('bloodmagic:orbs', [
    'bloodmagic:weakbloodorb',
    'bloodmagic:apprenticebloodorb',
    'bloodmagic:magicianbloodorb',
    'bloodmagic:masterbloodorb',
    'bloodmagic:archmagebloodorb'
  ])

  //Bee Flowers
  event.add('productivebees:flowers/cupric_flowers', ['minecraft:copper_ore', 'minecraft:deepslate_copper_ore', 'minecraft:copper_block', 'minecraft:raw_copper_block', 'minecraft:cut_copper', 'minecraft:exposed_cut_copper', 'minecraft:weathered_cut_copper', 'minecraft:oxidized_cut_copper', 'minecraft:exposed_copper', 'minecraft:weathered_copper', 'minecraft:oxidized_copper', 'minecraft:waxed_copper_block', 'minecraft:waxed_exposed_copper', 'minecraft:waxed_weathered_copper', 'minecraft:waxed_oxidized_copper', 'minecraft:lightning_rod'])
  event.add('productivebees:flowers/prismarine', ['minecraft:prismarine', 'minecraft:dark_prismarine', 'minecraft:prismarine_bricks', 'minecraft:sea_lantern'])
  event.add('productivebees:flowers/crystalline', ['forge:storage_blocks/quartz', 'forge:ores/quartz', 'minecraft:quartz_pillar', 'productivebees:quartz_netherrack'])
  event.add('productivebees:flowers/amethyst', ['minecraft:amethyst_block', 'minecraft:budding_amethyst', 'minecraft:amethyst_cluster'])
  event.add('productivebees:flowers/ferric_flowers', ['minecraft:iron_ore', 'minecraft:deepslate_iron_ore', 'minecraft:raw_iron_block', 'minecraft:iron_block', 'minecraft:iron_bars', 'minecraft:iron_door', 'minecraft:iron_trapdoor', 'minecraft:cauldron', 'minecraft:hopper', 'minecraft:anvil', 'minecraft:chipped_anvil', 'minecraft:damaged_anvil'])
  event.add('productivebees:flowers/draconic_flowers', ['minecraft:dragon_egg'])
  event.add('productivebees:flowers/redstone', ['forge:storage_blocks/redstone', 'forge:ores/redstone', 'minecraft:redstone_wire', 'minecraft:redstone_torch', 'minecraft:redstone_wall_torch', 'minecraft:redstone_lamp'])
  event.add('productivebees:flowers/diamond', ['forge:storage_blocks/diamond', 'forge:ores/diamond'])
  event.add('productivebees:flowers/emerald', ['forge:storage_blocks/emerald', 'forge:ores/emerald'])
  event.add('productivebees:flowers/sulfur', ['minecraft:coal_ore'])
  event.add('productivebees:flowers/souled_flowers', ['minecraft:soul_sand', 'minecraft:soul_soil'])
  event.add('productivebees:flowers/glowing_flowers', ['minecraft:shroomlight', 'minecraft:glowstone', 'minecraft:redstone_lamp'])
  event.add('productivebees:flowers/fiery', ['minecraft:magma_block', 'minecraft:fire'])
  event.add('productivebees:flowers/burning', ['minecraft:magma_block'])
  event.add('productivebees:flowers/ender', ['minecraft:chorus_flower', 'minecraft:chorus_plant'])
  event.add('productivebees:flowers/swamp_flowers', ['minecraft:flowers', 'minecraft:lily_pad'])
  event.add('productivebees:flowers/frozen', ['minecraft:ice', 'minecraft:snow', 'minecraft:snow_block'])
  event.add('productivebees:flowers/magmatic_flowers', ['productivebees:flowers/fiery', 'minecraft:nether_wart'])
  event.add('productivebees:flowers/gilded_flowers', ['minecraft:nether_gold_ore', 'minecraft:deepslate_gold_ore', 'minecraft:gold_ore', 'minecraft:gold_block', 'minecraft:raw_gold_block', 'minecraft:gilded_blackstone', 'minecraft:light_weighted_pressure_plate'])
  event.add('productivebees:flowers/wither_flowers', ['minecraft:wither_rose'])
  event.add('productivebees:animals', ["minecraft:cat_spawn_egg","minecraft:chicken_spawn_egg","minecraft:dolphin_spawn_egg","minecraft:fox_spawn_egg","minecraft:hoglin_spawn_egg","minecraft:mule_spawn_egg","minecraft:mooshroom_spawn_egg","minecraft:ocelot_spawn_egg","minecraft:panda_spawn_egg","minecraft:parrot_spawn_egg","minecraft:pig_spawn_egg","minecraft:polar_bear_spawn_egg","minecraft:rabbit_spawn_egg","minecraft:turtle_spawn_egg","minecraft:wolf_spawn_egg"])

  //Quarry Bee
  event.remove('productivebees:flowers/quarry', 'pneumaticcraft:compressed_stone')
  event.remove('productivebees:flowers/quarry', 'pneumaticcraft:reinforced_stone')
  event.remove('forge:stone', '#pneumaticcraft:reinforced_stone')
  event.remove('forge:stone', '#pneumaticcraft:compressed_stone')
})

ServerEvents.tags('block', event => {
  event.add('mysticalagriculture:crops', [
    'mysticalagriculture:allthemodium_crop',
    'mysticalagriculture:azure_silver_crop',
    'mysticalagriculture:crimson_iron_crop',
    'mysticalagriculture:unobtainium_crop',
    'mysticalagriculture:vibranium_crop'
  ])

  //MM Fluid Ports Input
  event.add('impostor:fluid_port_input', [
    'mm:small_fluid_port_input',
    'mm:large_fluid_port_input',
    'mm:maxed_fluid_port_input'
  ])

  //MM Fluid Ports Output
  event.add('impostor:fluid_port_output', [
    'mm:small_fluid_port_output',
    'mm:large_fluid_port_output',
    'mm:maxed_fluid_port_output'
  ])
  
  //MM Item Ports Input
  event.add('impostor:item_port_input', [
    'mm:small_item_port_input',
    'mm:item_port_input',
    'mm:large_item_port_input',
    'mm:huge_item_port_input',
    'mm:maxed_item_port_input'
  ])
  
  //MM Item Ports Output
  event.add('impostor:item_port_output', [
    'mm:small_item_port_output',
    'mm:item_port_output',
    'mm:large_item_port_output',
    'mm:huge_item_port_output',
    'mm:maxed_item_port_output'
  ])

  //MM Energy Ports Input
  event.add('impostor:energy_port_input', [
    'mm:small_power_port_input',
    'mm:power_port_input',
    'mm:large_power_port_input',
    'mm:huge_power_port_input',
    'mm:maxed_power_port_input'
  ])

  //MM Energy Ports Output
  event.add('impostor:energy_port_output', [
    'mm:small_power_port_output',
    'mm:power_port_output',
    'mm:large_power_port_output',
    'mm:huge_power_port_output',
    'mm:maxed_power_port_output'
  ])
  
  event.add('minecraft:beacon_base_blocks', [
    'allthemodium:vibranium_allthemodium_alloy_block',
    'allthemodium:unobtainium_allthemodium_alloy_block',
    'allthemodium:unobtainium_vibranium_alloy_block'
  ])

  //Quarry Bee
  event.remove('productivebees:flowers/quarry', [
    'pneumaticcraft:compressed_stone',
    'pneumaticcraft:reinforced_stone'])
  event.remove('forge:stone', '#pneumaticcraft:reinforced_stone')
  event.remove('forge:stone', '#pneumaticcraft:compressed_stone')

  //Apiary Frame  
  event.removeAll('mystianapiary:apiary_frame')
  
  event.add('mystianapiary:apiary_frame', '#minecraft:logs')
})

ServerEvents.tags('fluid', event => {
  event.remove('minecraft:water',[
    'ad_astra:oil','ad_astra:flowing_oil',
    'ad_astra:cryo_fuel','ad_astra:flowing_cryo_fuel',
    'ad_astra:fuel','ad_astra:flowing_fuel',
    'hexerei:blood_flowing','hexerei:blood_fluid',
    'hexerei:tallow_flowing','hexerei:tallow_fluid',
    'createaddition:flowing_seed_oil','createaddition:seed_oil'])
})

ServerEvents.tags('entity_type', event => {
  event.add('kubejs:mob_blacklist', [/productivebees:.+/, 'allthemodium:piglich', 'artifacts:mimic', 'minecraft:iron_golem'])
  event.add('mob_grinding_utils:no_swab', '#kubejs:mob_blacklist')
  event.add('mob_grinding_utils:no_spawn', '#kubejs:mob_blacklist')
  event.add('pneumaticcraft:vacuum_trap_blacklisted', '#kubejs:mob_blacklist')
  event.add('industrialforegoing:mob_duplicator_blacklist', '#kubejs:mob_blacklist')
  event.add('ars_nouveau:drygmy_blacklist', [/productivebees:.+/, 'artifacts:mimic'])
  event.add('spirit:soul_cage_blacklisted', '#kubejs:mob_blacklist')
  event.remove('ars_nouveau:jar_blacklist', '#twilightforest:bosses')
})

ServerEvents.tags('worldgen/biome', event => {
  event.add('botania:mystical_flower_spawnlist', 'allthemodium:mining')
  event.add('botania:mystical_mushroom_spawnlist', [
    'allthemodium:the_other', 'allthemodium:soul_sand_valley', 'allthemodium:warped_forest',
    'allthemodium:desert_hills', 'allthemodium:desert', 'allthemodium:crimson_forest', 'allthemodium:basalt_deltas'])
  event.add('elementalcraft:has_sources/all', 'allthemodium:mining')
  event.add('elementalcraft:has_sources/sky', 'allthemodium:mining')
  event.add('elementalcraft:has_sources/plain', 'allthemodium:mining')
})
