// priority: 10

ServerEvents.recipes(event => {

  //Double

  drawer2 ("minecraft:stone", 1, "strainers:stone_pebble", 4)
  drawer2 ("minecraft:coal", 1, "opolisutilities:mini_coal", 8)
  drawer2 ("minecraft:coal_block", 1, "minecraft:coal", 9)
  drawer2 ("minecraft:charcoal", 1, "opolisutilities:mini_charcoal", 8)

  function ingotsDrawers(material) {
    drawerTag (AlmostUnified.getPreferredItemForTag(`forge:ingots/${material}`).getId(), 1, AlmostUnified.getPreferredItemForTag(`forge:nuggets/${material}`).getId(), 9)
    drawerTag (AlmostUnified.getPreferredItemForTag(`forge:storage_blocks/${material}`).getId(), 1, AlmostUnified.getPreferredItemForTag(`forge:ingots/${material}`).getId(), 9)
  }
/*
  ingotsDrawers ("iron")

  ingotsDrawers ("iron")
  ingotsDrawers ("gold")
  ingotsDrawers ("copper")
  ingotsDrawers ("tin")
//  ingotsDrawers ("diamond")
//  ingotsDrawers ( "emerald")
//  ingotsDrawers ( "lapis")
//  ingotsDrawers ( "quartz")
//  ingotsDrawers ( "redstone")
  ingotsDrawers ( "bronze")
  ingotsDrawers ( "netherite")
  ingotsDrawers ( "constantan")
  ingotsDrawers ( "electrum")
  ingotsDrawers ( "enderium")
  ingotsDrawers ( "lumium")
  ingotsDrawers ( "signalum")
  ingotsDrawers ( "steel")
  ingotsDrawers ( "invar")
  ingotsDrawers ( "brass")
  ingotsDrawers ( "concrete")
  ingotsDrawers ( "lead")
  ingotsDrawers ( "aluminum")
  ingotsDrawers ( "iridium")
  ingotsDrawers ( "platinum")
  ingotsDrawers ( "silver")
  ingotsDrawers ( "uranium")
  ingotsDrawers ( "zinc")
  ingotsDrawers ( "osmium")
  ingotsDrawers ( "nickel")
  */



  //Functions
  function drawer2(higherItem, inCount, outItem, outCount) {

    event.custom({
      type: "functionalstorage:custom_compacting",
      higher_input: {count: inCount,item: higherItem},
      lower_input: {count: outCount,item: outItem}
    })
    }
  function drawerTag(higherItem, inCount, outItem, outCount) {

    event.custom({
      type: "functionalstorage:custom_compacting",
      higher_input: {count: inCount, item: higherItem},
      lower_input: {count: outCount, item: outItem}
    })
    }




})
