//priority: 10

const addToTag = [
  {
    "name": "forge:ores/quartz",
    "entries": [
      "byg:blue_nether_quartz_ore",
      "byg:brimstone_nether_quartz_ore"
    ]
  },
  {
    "name": "forge:raw_fishes",
    "entries": [
      "aquaculture:fish_fillet_raw",
      "aquaculture:atlantic_cod",
      "aquaculture:blackfish",
      "aquaculture:pacific_halibut",
      "aquaculture:atlantic_halibut",
      "aquaculture:atlantic_herring",
      "aquaculture:pink_salmon",
      "aquaculture:pollock",
      "aquaculture:rainbow_trout",
      "aquaculture:bayad",
      "aquaculture:boulti",
      "aquaculture:capitaine",
      "aquaculture:synodontis",
      "aquaculture:smallmouth_bass",
      "aquaculture:bluegill",
      "aquaculture:brown_trout",
      "aquaculture:carp",
      "aquaculture:catfish",
      "aquaculture:gar",
      "aquaculture:minnow",
      "aquaculture:muskellunge",
      "aquaculture:perch",
      "aquaculture:arapaima",
      "aquaculture:piranha",
      "aquaculture:tambaqui",
      "aquaculture:brown_shrooma",
      "aquaculture:red_shrooma",
      "aquaculture:red_grouper",
      "aquaculture:tuna",
      "aquaculture:frog",
      "aquaculture:goldfish"
    ]
  },
  {
    "name": "farmersdelight:cabbage_roll_ingredients",
    "entries": [
      "aquaculture:fish_fillet_raw"
    ]
  },
  {
    "name": "forge:dirt",
    "entries": [
      "unearthed:regolith"
    ]
  },
  {
    "name": "forge:barrels/wooden",
    "entries": [
      "charm:acacia_barrel",
      "charm:birch_barrel",
      "charm:crimson_barrel",
      "charm:dark_oak_barrel",
      "charm:jungle_barrel",
      "charm:oak_barrel",
      "charm:spruce_barrel",
      "charm:warped_barrel"
    ]
  },
  {
    "name": "forge:storage_blocks/quartz",
    "entries": [
      "byg:raw_quartz_block"
    ]
  },
  {
    "name": "witchery_rewitched:mutandis_plants",
    "entries": [
      "#minecraft:small_flowers",
      "#minecraft:saplings",
      "minecraft:grass",
      "witchery_rewitched:rowan_sapling",
      "minecraft:tall_grass",
      "witchery_rewitched:alder_sapling",
      "witchery_rewitched:hawthorn_sapling",
      "witchery_rewitched:spanish_moss",
      "witchery_rewitched:ember_moss",
      "witchery_rewitched:glintweed"
    ]
  },
  {
    "name": "forge:mandrake_roots",
    "entries": [
      "witchery_rewitched:mandrake_root",
      "hexerei:mandrake_root"
    ]
  }
];

const removeFromtag = [
  {
    "name": "forge:ores/coal",
    "item": "better_diving:coal_chunk"
  },
  {
    "name": "forge:ores/copper",
    "item": "better_diving:copper_chunk"
  },
  {
    "name": "forge:ores/iron",
    "item": "better_diving:iron_chunk"
  },
  {
    "name": "forge:ores/lead",
    "item": "better_diving:lead_chunk"
  },
  {
    "name": "forge:ores/silver",
    "item": "better_diving:silver_chunk"
  },
  {
    "name": "forge:ores/gold",
    "item": "better_diving:gold_chunk"
  },
  {
    "name": "forge:ores/redstone",
    "item": "better_diving:redstone_chunk"
  },
  {
    "name": "forge:ores/lapis",
    "item": "better_diving:lapis_chunk"
  },
  {
    "name": "forge:ores/emerald",
    "item": "better_diving:emerald_chunk"
  },
  {
    "name": "forge:ores/diamond",
    "item": "better_diving:diamond_chunk"
  },
  {
    "name": "forge:ores/ametrine",
    "item": "byg:ametrine_ore"
  },
  {
    "name": "forge:ores/ametrine",
    "item": "byg:budding_ametrine_ore"
  },
  {
    "name": "forge:ores/pendorite",
    "item": "byg:pendorite_ore"
  },
  {
    "name": "forge:ores/lead",
    "item": "eidolon:lead_ore"
  }
];

const removeAllFromTag = [
  "forge:storage_blocks/lithium",
  "forge:ingots/lithium",
  "forge:ores/lithium",
  "forge:storage_blocks/titanium",
  "forge:ingots/titanium",
  "forge:ores/titanium"
];

onEvent("item.tags", tagEvent => {
  for (let tag of addToTag) {
    for (let entry of tag.entries) {
      tagEvent.add(tag.name, entry);
    }
  }

  for (let tag of removeFromtag) {
    tagEvent.remove(tag.name, tag.item);
  }

  for (let tag of removeAllFromTag) {
    tagEvent.removeAll(tag);
  }
});

