// priority: 0
// made by odin

ServerEvents.recipes(event => {
  // ─── Removals ───
  const itemsToRemove = [
    'minecraft:netherite_upgrade_smithing_template',
    'minecraft:stone_pickaxe',
    'minecraft:stone_axe',
    'minecraft:stone_sword',
    'minecraft:stone_hoe',
    'minecraft:stone_shovel',
    'minecraft:furnace',
    'armageddon_mod:bloody_sword',
    'armageddon_mod:bloody_shovel',
    'terramity:sword_of_the_imprisoned',
    'armageddon_mod:helionite_bricks',
    'armageddon_mod:bloody_bricks',
    'armageddon_mod:mossy_helionite_bricks',
    'armageddon_mod:mossy_helionite_stairs',
    'armageddon_mod:mossy_bloody_bricks',
    'armageddon_mod:mossy_bloody_stairs',
    'mekanismtools:stone_paxel',
    'lethality:stone_bafs',
    'armageddon_mod:stone_throwing_dagger'
  ]

  itemsToRemove.forEach(item => {
    event.remove({ output: item })
  })

  // ─── Furnace (cobblestone or igneostone + coal) ───
  const furnaceRecipe = (stone) => {
    event.shaped('minecraft:furnace', [
      'SSS',
      'SCS',
      'SSS'
    ], {
      S: stone,
      C: 'minecraft:coal'
    })
  }

  furnaceRecipe('#forge:cobblestone')
  furnaceRecipe('terramity:igneostone')

  // ─── Netherite template duplication ───
  event.shaped(
    Item.of('minecraft:netherite_upgrade_smithing_template', 2),
    [
      'aba',
      'ded',
      'ddd'
    ], {
      a: 'minecraft:iron_ingot',
      b: 'minecraft:netherite_upgrade_smithing_template',
      d: 'minecraft:diamond',
      e: 'quark:netherrack_bricks'
    }
  )

  // ─── Enchanted book ───
  event.shaped('minecraft:enchanted_book', [
    'ed',
    'a ',
  ], {
    a: 'minecraft:lava_bucket',
    d: 'minecraft:pufferfish',
    e: 'minecraft:book'
  })

  // ─── Ascendral alloy (9x shard) ───
  event.shaped('kubejs:ascendral_alloy', [
    'aaa',
    'aaa',
    'aaa'
  ], {
    a: 'kubejs:ascendral_shard'
  })

  // ─── Ascendral star (4x alloy) ───
  event.shaped('kubejs:ascendral_star', [
    ' a ',
    'a a',
    ' a '
  ], {
    a: 'kubejs:ascendral_alloy'
  })
})
