//Item tags go here
events.listen('item.tags', function (event) {
  var add = function(tag, id) {
    event.get(tag).add(id)
  }
  var remove = function(tag, id) {
    event.get(tag).remove(id)
  }
  var addStorage = function (name, id) {
    event.get('forge:storage_blocks/'+name).add(id)
  }
  var addOre = function (name, id) {
    event.get('forge:ores/'+name).add(id)
  }
  var addIngot = function (name, id) {
    event.get('forge:ingots/'+name).add(id)
  }
  var addStem = function (name, id) {
    event.get('forge:mushroom_stems/'+name).add(id)
  }
  var addCap = function (name, id) {
    event.get('forge:mushroom_caps/'+name).add(id)
  }

  //Add
  add('curios:curio',['simplemagnets:basicmagnet','simplemagnets:advancedmagnet'])
  addOre('netherite','minecraft:ancient_debris')
  addOre('gold','#minecraft:gold_ores')
  add('forge:ores',['#minecraft:gold_ores','#forge:ores/netherite','#forge:ores/certus_quartz','#forge:ores/oratchalcum'])
  add('forge:plastic',['#pneumaticcraft:plastic_sheets','silents_mechanisms:plastic_sheet','mekanism:hdpe_sheet'])
  add('misctags:farmland/tier1',['mysticalagriculture:inferium_farmland','mysticalagriculture:prudentium_farmland','mysticalagriculture:tertium_farmland','mysticalagriculture:imperium_farmland','mysticalagriculture:supremium_farmland','mysticalagradditions:insanium_farmland'])
  add('misctags:farmland/tier2',['mysticalagriculture:prudentium_farmland','mysticalagriculture:tertium_farmland','mysticalagriculture:imperium_farmland','mysticalagriculture:supremium_farmland','mysticalagradditions:insanium_farmland'])
  add('misctags:farmland/tier3',['mysticalagriculture:tertium_farmland','mysticalagriculture:imperium_farmland','mysticalagriculture:supremium_farmland','mysticalagradditions:insanium_farmland'])
  add('misctags:farmland/tier4',['mysticalagriculture:imperium_farmland','mysticalagriculture:supremium_farmland','mysticalagradditions:insanium_farmland'])
  add('misctags:farmland/tier5',['mysticalagriculture:supremium_farmland','mysticalagradditions:insanium_farmland'])
  add('misctags:farmland/tier6',['mysticalagradditions:insanium_farmland'])
  add('misctags:biofuel2',['#minecraft:saplings','#minecraft:leaves','#forge:seeds','minecraft:dried_kelp','minecraft:kelp','minecraft:seagrass','minecraft:grass'])
  add('misctags:biofuel4',['#forge:fruits','minecraft:tall_grass','minecraft:nether_sprouts','minecraft:dried_kelp_block','minecraft:cactus','minecraft:sugar_cane','minecraft:weeping_vines','minecraft:twisting_vines','minecraft:vine','minecraft:melon_slice','byg:skyris_vine','byg:embur_gel_vines'])
  add('misctags:biofuel5',['#forge:vegetables','#forge:flour_plants','#forge:mushrooms','#forge:mushroom_stems','#minecraft:flowers','minecraft:lily_pad','minecraft:sea_pickle','minecraft:shroomlight','minecraft:large_fern','minecraft:fern','minecraft:crimson_roots','minecraft:warped_roots','minecraft:carved_pumpkin','minecraft:nether_wart','minecraft:cocoa_beans'])
  add('misctags:biofuel7',['#forge:wart_blocks','#forge:mushroom_caps','minecraft:baked_potato','minecraft:hay_block','#forge:cookies','#forge:bread'])
  add('misctags:biofuel8',['minecraft:cake','minecraft:pumpkin_pie'])
  add('forge:axes',['minecraft:wooden_axe','minecraft:stone_axe','minecraft:golden_axe','minecraft:iron_axe','minecraft:diamond_axe','minecraft:netherite_axe','byg:pendorite_axe','byg:pendorite_battleaxe','rats:ratlantis_axe','mekanismtools:refined_obsidian_paxel','mekanismtools:refined_obsidian_axe','mekanismtools:steel_axe','mekanismtools:steel_paxel','mekanismtools:refined_glowstone_paxel','mekanismtools:refined_glowstone_axe','mekanismtools:lapis_lazuli_paxel','mekanismtools:lapis_lazuli_axe','mekanismtools:bronze_paxel','mekanismtools:bronze_axe','mekanismtools:osmium_axe','mekanismtools:osmium_paxel','mekanismtools:netherite_paxel','mekanismtools:diamond_paxel','mekanismtools:iron_paxel','mekanismtools:gold_paxel','mekanismtools:stone_paxel','mekanismtools:wood_paxel','immersiveengineering:axe_steel','forbidden_arcanus:bone_axe','forbidden_arcanus:obsidian_axe','forbidden_arcanus:reinforced_arcane_golden_axe','forbidden_arcanus:arcane_golden_axe','forbidden_arcanus:draco_arcanus_axe','bluepower:ruby_axe','bluepower:sapphire_axe','bluepower:malachite_axe','bluepower:amethyst_axe','bluepower:tungcarb_axe','allthemodium:alloy_axe','engineerstools:redia_tool'])
  add('forge:shovels',['minecraft:wooden_shovel','minecraft:stone_shovel','minecraft:golden_shovel','minecraft:iron_shovel','minecraft:diamond_shovel','minecraft:netherite_shovel','byg:pendorite_shovel','rats:ratlantis_shovel','mekanismtools:refined_obsidian_paxel','mekanismtools:refined_obsidian_shovel','mekanismtools:steel_shovel','mekanismtools:steel_paxel','mekanismtools:refined_glowstone_paxel','mekanismtools:refined_glowstone_shovel','mekanismtools:lapis_lazuli_paxel','mekanismtools:lapis_lazuli_shovel','mekanismtools:bronze_paxel','mekanismtools:bronze_shovel','mekanismtools:osmium_shovel','mekanismtools:osmium_paxel','mekanismtools:netherite_paxel','mekanismtools:diamond_paxel','mekanismtools:iron_paxel','mekanismtools:gold_paxel','mekanismtools:stone_paxel','mekanismtools:wood_paxel','immersiveengineering:shovel_steel','forbidden_arcanus:bone_shovel','forbidden_arcanus:obsidian_shovel','forbidden_arcanus:reinforced_arcane_golden_shovel','forbidden_arcanus:arcane_golden_shovel','forbidden_arcanus:draco_arcanus_shovel','bluepower:ruby_shovel','bluepower:sapphire_shovel','bluepower:malachite_shovel','bluepower:amethyst_shovel','bluepower:tungcarb_shovel','engineerstools:redia_tool'])
  add('forge:pickaxes',['minecraft:wooden_pickaxe','minecraft:stone_pickaxe','minecraft:golden_pickaxe','minecraft:iron_pickaxe','minecraft:diamond_pickaxe','minecraft:netherite_pickaxe','byg:pendorite_pickaxe','rats:ratlantis_pickaxe','mekanismtools:refined_obsidian_paxel','mekanismtools:refined_obsidian_pickaxe','mekanismtools:steel_pickaxe','mekanismtools:steel_paxel','mekanismtools:refined_glowstone_paxel','mekanismtools:refined_glowstone_pickaxe','mekanismtools:lapis_lazuli_paxel','mekanismtools:lapis_lazuli_pickaxe','mekanismtools:bronze_paxel','mekanismtools:bronze_pickaxe','mekanismtools:osmium_pickaxe','mekanismtools:osmium_paxel','mekanismtools:netherite_paxel','mekanismtools:diamond_paxel','mekanismtools:iron_paxel','mekanismtools:gold_paxel','mekanismtools:stone_paxel','mekanismtools:wood_paxel','immersiveengineering:pickaxe_steel','forbidden_arcanus:bone_pickaxe','forbidden_arcanus:obsidian_pickaxe','forbidden_arcanus:reinforced_arcane_golden_pickaxe','forbidden_arcanus:arcane_golden_pickaxe','forbidden_arcanus:draco_arcanus_pickaxe','bluepower:ruby_pickaxe','bluepower:sapphire_pickaxe','bluepower:malachite_pickaxe','bluepower:amethyst_pickaxe','bluepower:tungcarb_pickaxe','allthemodium:alloy_pick','engineerstools:redia_tool'])
  add('minecraft:furnace_materials',['#forge:stone','#forge:cobblestone'])
  add('appliedenergistics2:nether_quartz_dust','#forge:dusts/quartz')
  add('appliedenergistics2:dusts/nether_quartz','#forge:dusts/quartz')
  add('appliedenergistics2:dusts/quartz','#forge:dusts/quartz')
  add('forge:seeds',['bluepower:flax_seeds','immersiveengineering:seed'])
  add('engineerstools:musli_bar_seeds','#forge:seeds')
  add('forge:ingots',['#forge:ingots/unobtainium_allthemodium_alloy','#forge:ingots/vibranium_unobtainium_alloy','#forge:ingots/vibranium_allthemodium_alloy','#forge:ingots/netherite','#forge:ingots/oratchalcum'])
  add('forge:sand',['byg:white_sand','byg:black_sand','byg:purple_sand','byg:blue_sand'])
  add('forge:nuggets','#forge:nuggets/oratchalcum')
  addStorage('netherite','minecraft:netherite_block')
  addStorage('uraninite','powah:uraninite_block')
  addIngot('netherite','minecraft:netherite_ingot')
  addCap('black_puff_mushroom','byg:black_puff_mushroom_block')
  addCap('blue_glowshroom','byg:blue_glowshroom_block')
  addCap('weeping_milkcap_mushroom','byg:weeping_milkcap_mushroom_block')
  addCap('green_mushroom','byg:green_mushroom_block')
  addCap('purple_glowshroom','byg:purple_glowshroom_block')
  addCap('brown_mushroom','minecraft:brown_mushroom_block')
  addCap('red_mushroom','minecraft:red_mushroom_block')
  addStem('brown_mushroom','byg:brown_mushroom_stem')
  addStem('red_glowshroom','byg:red_glowshroom_stem')
  addStem('white_mushroom','byg:white_mushroom_stem')
  addStem('yellow_glowshroom','byg:yellow_glowshroom_stem')
  addStem('mushroom','minecraft:mushroom_stem')
  add('forge:mushroom_caps',['#forge:mushroom_caps/red_mushroom','#forge:mushroom_caps/brown_mushroom','#forge:mushroom_caps/blue_glowshroom','#forge:mushroom_caps/purple_glowshroom','#forge:mushroom_caps/green_mushroom','#forge:mushroom_caps/black_puff_mushroom','#forge:mushroom_caps/weeping_milkcap_mushroom'])
  add('forge:mushroom_stems',['#forge:mushroom_stems/mushroom','#forge:mushroom_stems/brown_mushroom','#forge:mushroom_stems/white_mushroom','#forge:mushroom_stems/red_glowshroom','#forge:mushroom_stems/yellow_glowshroom'])
  add('forge:mushrooms',['minecraft:warped_fungus','minecraft:crimson_fungus','byg:blue_glowshroom','byg:purple_glowshroom'])
  add('forge:storage_blocks',['#forge:storage_blocks/netherite','#forge:storage_blocks/uraninite','#forge:storage_blocks/oratchalcum'])
  add('forge:wart_blocks',['minecraft:nether_wart_block','minecraft:warped_wart_block'])

  //Remove
  remove('forge:leather', 'forbidden_arcanus:rotten_leather')
  remove('engineerstools:musli_bar_food_blacklisted', 'minecraft:chicken')
  remove('forge:dyes', 'mekanism:dust_sulfur')
  remove('forge:dyes/yellow', 'mekanism:dust_sulfur')
  remove('forge:nether_stars', 'forbidden_arcanus:dark_nether_star')
})

//Block tags go here
events.listen('block.tags', function (event) {
  var add = function(tag, id) {
    event.get(tag).add(id)
  }
  var remove = function(tag, id) {
    event.get(tag).remove(id)
  }
  var addStorage = function (name, id) {
    event.get('forge:storage_blocks/'+name).add(id)
  }
  var addOre = function (name, id) {
    event.get('forge:ores/'+name).add(id)
  }
  var addStem = function (name, id) {
    event.get('forge:mushroom_stems/'+name).add(id)
  }
  var addCap = function (name, id) {
    event.get('forge:mushroom_caps/'+name).add(id)
  }
  //Add
  add('forge:ores/netherite','minecraft:ancient_debris')
  add('forge:ores/gold','#minecraft:gold_ores')
  add('forge:ores/certus_quartz',['appliedenergistics2:quartz_ore','appliedenergistics2:charged_quartz_ore'])
  add('forge:ores/oratchalcum','#minecraft:gold_ores')
  add('forge:ores/quartz','#forge:ores/certus_quartz')
  add('forge:ores',['#minecraft:gold_ores','#forge:ores/netherite','#forge:ores/certus_quartz','#forge:ores/oratchalcum'])
  add('minecraft:wither_immune','refinedstorage:crafter','refinedstorage:grid','refinedstorage:disk_drive','refinedstorage:crafting_grid','refinedstorage:pattern_grid','refinedstorage:fluid_grid','refinedstorage:1k_storage_block','refinedstorage:4k_storage_block','refinedstorage:16k_storage_block','refinedstorage:64k_storage_block','refinedstorage:creative_storage_block','refinedstorage:controller','refinedstorage:creative_controller','refinedstorage:64k_fluid_storage_block','refinedstorage:256k_fluid_storage_block','refinedstorage:1024k_fluid_storage_block','refinedstorage:4096k_fluid_storage_block','refinedstorage:creative_fluid_storage_block','refinedstorage:external_storage','refinedstorage:importer','refinedstorage:exporter','refinedstorage:network_receiver','refinedstorage:network_transmitter','refinedstorage:relay','refinedstorage:detector','refinedstorage:security_manager','refinedstorage:interface','refinedstorage:fluid_interface','refinedstorage:wireless_transmitter','refinedstorage:storage_monitor','refinedstorage:constructor','refinedstorage:destructor','refinedstorage:disk_manipulator','refinedstorage:crafter_manager','refinedstorage:crafting_monitor')
  add('bagofyurting:blacklist','#mekanism:cardboard_blacklist')
  add('misctags:flowers/draconic_flowers',['minecraft:dragon_egg'])
  add('misctags:flowers/end_flowers',['minecraft:chorus_flower','minecraft:chorus_plant'])
  add('misctags:flowers/forest_flowers',['#minecraft:flowers','minecraft:sweet_berry_bush'])
  add('misctags:flowers/glowing_flowers',['minecraft:shroomlight','minecraft:glowstone','minecraft:redstone_lamp'])
  add('misctags:flowers/magical_flowers',['#botania:special_flowers','#botania:mystical_flowers','#botania:double_mystical_flowers'])
  add('misctags:flowers/nether_flowers',['minecraft:crimson_fungus','minecraft:warped_fungus','minecraft:nether_wart','minecraft:crimson_roots','minecraft:warped_roots','minecraft:weeping_vines','minecraft:twisting_vines'])
  add('misctags:flowers/swamp_flowers',['byg:tiny_lilypads','byg:reeds','byg:cattail','minecraft:lily_pad','minecraft:sugar_cane','minecraft:brown_mushroom','minecraft:red_mushroom'])
  add('misctags:flowers/wither_flowers',['minecraft:wither_rose'])
  add('resourcefulbees:valid_apiary','minecraft:polished_blackstone_bricks')
  addCap('black_puff_mushroom','byg:black_puff_mushroom_block')
  addCap('blue_glowshroom','byg:blue_glowshroom_block')
  addCap('weeping_milkcap_mushroom','byg:weeping_milkcap_mushroom_block')
  addCap('green_mushroom','byg:green_mushroom_block')
  addCap('purple_glowshroom','byg:purple_glowshroom_block')
  addCap('brown_mushroom','minecraft:brown_mushroom_block')
  addCap('red_mushroom','minecraft:red_mushroom_block')
  addStem('brown_mushroom','byg:brown_mushroom_stem')
  addStem('red_glowshroom','byg:red_glowshroom_stem')
  addStem('white_mushroom','byg:white_mushroom_stem')
  addStem('yellow_glowshroom','byg:yellow_glowshroom_stem')
  addStem('mushroom','minecraft:mushroom_stem')
  add('forge:mushroom_caps',['#forge:mushroom_caps/red_mushroom','#forge:mushroom_caps/brown_mushroom','#forge:mushroom_caps/blue_glowshroom','#forge:mushroom_caps/purple_glowshroom','#forge:mushroom_caps/green_mushroom','#forge:mushroom_caps/black_puff_mushroom','#forge:mushroom_caps/weeping_milkcap_mushroom'])
  add('forge:mushroom_stems',['#forge:mushroom_stems/mushroom','#forge:mushroom_stems/brown_mushroom','#forge:mushroom_stems/white_mushroom','#forge:mushroom_stems/red_glowshroom','#forge:mushroom_stems/yellow_glowshroom'])
  add('forge:mushrooms',['minecraft:warped_fungus','minecraft:crimson_fungus','byg:blue_glowshroom','byg:purple_glowshroom'])
  add('forge:storage_blocks',['#forge:storage_blocks/netherite','#forge:storage_blocks/uraninite','#forge:storage_blocks/oratchalcum'])
  addStorage('netherite','minecraft:netherite_block')
  addStorage('uraninite','powah:uraninite_block')
  addStorage('oratchalcum','rats:oratchalcum_block')
})

//Fluid tags go here
events.listen('fluid.tags', function (event) {
  var add = function(tag, id) {
    event.get(tag).add(id)
  }
  var remove = function(tag, id) {
    event.get(tag).remove(id)
  }
  //Add
  add('forge:essence','pneumaticcraft:memory_essence')
})