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('ars_nouveau:golem/shard', 'minecraft:amethyst_shard')
  event.add('forge:raw_materials', ['silentgear:raw_azure_silver', 'silentgear:raw_crimson_iron'])
  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: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')
})

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'
  ])
  
  event.add('minecraft:beacon_base_blocks', [
    'allthemodium:vibranium_allthemodium_alloy_block',
    'allthemodium:unobtainium_allthemodium_alloy_block',
    'allthemodium:unobtainium_vibranium_alloy_block'
  ])
})

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')
})

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')
})
