ServerEvents.recipes(event => {

  event.shaped(
    Item.of('kubejs:armor_upgrade_template', 4),
    [
      'III',
      'IOI',
      'ILI'
    ],
    {
      O: 'overgeared:steel_nugget',
      I: 'overgeared:steel_plate',
      L: 'overgeared:steel_ingot'
    }
  );

  let armors = [
    'magistuarmoryaddon:early_greathelm',
    'magistuarmory:greathelm',
    'magistuarmoryaddon:late_greathelm',
    'magistuarmoryaddon:maximilian_burgonet',
    'magistuarmory:maximilian_helmet',
    'magistuarmoryaddon:exquisite_maximilian_helmet',
    'magistuarmoryaddon:fox_grotesque_maximilian_helmet',
    'magistuarmoryaddon:bellows_maximilian_helmet',
    'magistuarmoryaddon:facial_grotesque_maximilian_helmet',
    'magistuarmoryaddon:devilish_grotesque_maximilian_helmet',
    'magistuarmoryaddon:sallet_without_neck_protection',
    'magistuarmory:sallet',
    'magistuarmoryaddon:two_eye_slits_sallet',
    'magistuarmoryaddon:late_sallet',
    'magistuarmoryaddon:proto_maximilian_chestplate',
    'magistuarmoryaddon:proto_maximilian_boots',
    'magistuarmory:maximilian_chestplate',
    'magistuarmory:maximilian_leggings',
    'magistuarmory:maximilian_boots',
    'magistuarmoryaddon:savoyard_helmet',
    'magistuarmory:gothic_chestplate',
    'magistuarmory:kastenbrust_chestplate',
    'magistuarmoryaddon:steel_puff_and_slash_chestplate',
    'magistuarmoryaddon:english_knight_chestplate',
    'magistuarmoryaddon:peascod_chestplate',
    'magistuarmory:gothic_leggings',
    'magistuarmory:maximilian_leggings',
    'magistuarmory:kastenbrust_leggings',
    'magistuarmoryaddon:avant_leggings',
    'magistuarmory:gothic_boots',
    'magistuarmory:maximilian_boots',
    'magistuarmory:kastenbrust_boots',
    'magistuarmoryaddon:avant_boots'
  ]

  /*

  [Item.of('magistuarmoryaddon:dark_knight_helmet', '{Damage:0}'), Item.of('magistuarmoryaddon:dark_gothic_helmet', '{Damage:0}'), Item.of('magistuarmoryaddon:darkblued_armet', '{Damage:0}'), Item.of('magistuarmoryaddon:darkblued_sallet', '{Damage:0}'), 'magistuarmory:darkening_template']

  */

  // fixed recipes

  event.smithing(
    'magistuarmoryaddon:darkblued_armet',
    'magistuarmory:darkening_template',
    'magistuarmoryaddon:dark_knight_helmet',
    'minecraft:lapis_lazuli'
  )

  event.smithing(
    'magistuarmoryaddon:darkblued_sallet',
    'magistuarmory:darkening_template',
    'magistuarmoryaddon:dark_gothic_helmet',
    'minecraft:lapis_lazuli'
  )

  /*

  items lol

  ['overgeared:steel_nugget', 'overgeared:steel_plate']

  */

  armors.forEach((output) => event.remove({ output: output }));

  // greathelms

  event.smithing(
    'magistuarmoryaddon:early_greathelm',
    'kubejs:armor_upgrade_template',
    'magistuarmoryaddon:tablet_helmet',
    'overgeared:steel_plate'
  )

  event.smithing(
    'magistuarmory:greathelm',
    'kubejs:armor_upgrade_template',
    'magistuarmoryaddon:early_greathelm',
    'overgeared:steel_plate'
  )

  event.smithing(
    'magistuarmoryaddon:late_greathelm',
    'kubejs:armor_upgrade_template',
    'magistuarmory:greathelm',
    'overgeared:steel_plate'
  )

  // maximilian helms

  event.custom({
    "type": "overgeared:forging",
    "blueprint": "ARMOR",
    "hammering": 5,
    "has_polishing": false,
    "has_quality": true,
    "pattern": [
      "aaa",
      "bcb",
      "bab"
    ],
    "key": {
      "a": {
        "item": "overgeared:steel_plate"
      },
      "b": {
        "item": "overgeared:steel_ingot"
      },
      "c": {
        "item": "magistuarmory:cuirassier_helmet"
      }
    },
    "result": {
      "item": "magistuarmoryaddon:maximilian_burgonet",
      "count": 1
    },
    "show_notification": true
  })

  event.smithing(
    'magistuarmory:maximilian_helmet',
    'kubejs:armor_upgrade_template',
    'magistuarmoryaddon:maximilian_burgonet',
    'overgeared:steel_plate'
  )

  event.smithing(
    'magistuarmoryaddon:exquisite_maximilian_helmet',
    'kubejs:armor_upgrade_template',
    'magistuarmory:maximilian_helmet',
    'overgeared:steel_plate'
  )

  event.smithing(
    'magistuarmoryaddon:bellows_maximilian_helmet',
    'kubejs:armor_upgrade_template',
    'magistuarmoryaddon:exquisite_maximilian_helmet',
    'overgeared:steel_plate'
  )

  event.smithing(
    'magistuarmoryaddon:fox_grotesque_maximilian_helmet',
    'kubejs:armor_upgrade_template',
    'magistuarmoryaddon:exquisite_maximilian_helmet',
    'overgeared:steel_ingot'
  )

  event.smithing(
    'magistuarmoryaddon:facial_grotesque_maximilian_helmet',
    'kubejs:armor_upgrade_template',
    'magistuarmoryaddon:fox_grotesque_maximilian_helmet',
    'overgeared:steel_ingot'
  )

  event.smithing(
    'magistuarmoryaddon:devilish_grotesque_maximilian_helmet',
    'kubejs:armor_upgrade_template',
    'magistuarmoryaddon:facial_grotesque_maximilian_helmet',
    'overgeared:steel_ingot'
  )

  // savoyard

  event.smithing(
    'magistuarmoryaddon:savoyard_helmet',
    'kubejs:armor_upgrade_template',
    'magistuarmory:cuirassier_helmet',
    'overgeared:steel_plate'
  )

  // sallet

  event.smithing(
    'magistuarmoryaddon:sallet_without_neck_protection',
    'kubejs:armor_upgrade_template',
    'magistuarmoryaddon:sallet_without_visor',
    'overgeared:steel_plate'
  )

  event.smithing(
    'magistuarmory:sallet',
    'kubejs:armor_upgrade_template',
    'magistuarmoryaddon:sallet_without_neck_protection',
    'overgeared:steel_plate'
  )

  event.smithing(
    'magistuarmoryaddon:late_sallet',
    'kubejs:armor_upgrade_template',
    'magistuarmory:sallet',
    'overgeared:steel_plate'
  )

  event.smithing(
    'magistuarmoryaddon:two_eye_slits_sallet',
    'kubejs:armor_upgrade_template',
    'magistuarmory:sallet',
    'overgeared:steel_nugget'
  )

  // maximilian

  event.smithing(
    'magistuarmoryaddon:proto_maximilian_chestplate',
    'kubejs:armor_upgrade_template',
    'magistuarmory:knight_chestplate',
    'overgeared:steel_plate'
  )

  event.smithing(
    'magistuarmoryaddon:proto_maximilian_boots',
    'kubejs:armor_upgrade_template',
    'magistuarmory:knight_boots',
    'overgeared:steel_plate'
  )

  event.smithing(
    'magistuarmory:maximilian_chestplate',
    'kubejs:armor_upgrade_template',
    'magistuarmoryaddon:proto_maximilian_chestplate',
    'overgeared:steel_plate'
  )

  event.smithing(
    'magistuarmory:maximilian_leggings',
    'kubejs:armor_upgrade_template',
    'magistuarmory:knight_leggings',
    'overgeared:steel_plate'
  )

  event.smithing(
    'magistuarmory:maximilian_boots',
    'kubejs:armor_upgrade_template',
    'magistuarmoryaddon:proto_maximilian_boots',
    'overgeared:steel_plate'
  )

  // gothic

  event.smithing(
    'magistuarmory:gothic_chestplate',
    'kubejs:armor_upgrade_template',
    'magistuarmory:knight_chestplate',
    'overgeared:steel_nugget'
  )

  event.smithing(
    'magistuarmory:gothic_leggings',
    'kubejs:armor_upgrade_template',
    'magistuarmory:knight_leggings',
    'overgeared:steel_nugget'
  )

  event.smithing(
    'magistuarmory:gothic_boots',
    'kubejs:armor_upgrade_template',
    'magistuarmory:knight_boots',
    'overgeared:steel_nugget'
  )

  event.smithing(
    'magistuarmory:kastenbrust_chestplate',
    'kubejs:armor_upgrade_template',
    'magistuarmory:knight_chestplate',
    'magistuarmory:small_steel_plate'
  )

  event.smithing(
    'magistuarmory:kastenbrust_leggings',
    'kubejs:armor_upgrade_template',
    'magistuarmory:knight_leggings',
    'magistuarmory:small_steel_plate'
  )

  event.smithing(
    'magistuarmory:kastenbrust_boots',
    'kubejs:armor_upgrade_template',
    'magistuarmory:knight_boots',
    'magistuarmory:small_steel_plate'
  )

  event.smithing(
    'magistuarmoryaddon:steel_puff_and_slash_chestplate',
    'kubejs:armor_upgrade_template',
    'magistuarmory:kastenbrust_chestplate',
    'overgeared:steel_plate'
  )

  event.smithing(
    'magistuarmoryaddon:steel_puff_and_slash_boots',
    'kubejs:armor_upgrade_template',
    'magistuarmory:kastenbrust_boots',
    'overgeared:steel_plate'
  )

  // knight

  event.smithing(
    'magistuarmoryaddon:english_knight_chestplate',
    'kubejs:armor_upgrade_template',
    'magistuarmory:knight_chestplate',
    'overgeared:steel_ingot'
  )

  event.smithing(
    'magistuarmoryaddon:peascod_chestplate',
    'kubejs:armor_upgrade_template',
    'magistuarmoryaddon:english_knight_chestplate',
    'overgeared:steel_ingot'
  )

  event.smithing(
    'magistuarmoryaddon:avant_leggings',
    'kubejs:armor_upgrade_template',
    'magistuarmory:knight_leggings',
    'overgeared:steel_ingot'
  )

  event.smithing(
    'magistuarmoryaddon:avant_boots',
    'kubejs:armor_upgrade_template',
    'magistuarmory:knight_boots',
    'overgeared:steel_ingot'
  )

  event.smithing(
    'magistuarmoryaddon:english_knight_boots',
    'kubejs:armor_upgrade_template',
    'magistuarmoryaddon:avant_boots',
    'overgeared:steel_ingot'
  )
  
});

ServerEvents.tags('item', event => {
  event.add('magistuarmory:woolen_fabric', 'magistuarmory:woolen_fabric')
});