ServerEvents.recipes(event => {

// Melting Managlass
event.custom({
  "type": "embers:melting",
  "conditions": [
    {
      "type": "forge:not",
      "value": {
        "type": "forge:tag_empty",
        "item": "botania:mana_glass"
      }
    }
  ],
  "input": {
    "item": "botania:mana_glass"
  },
  "output": {
    "amount": 1000,
    "fluid": "kubejs:liquid_managlass"
  }
})

// Alf trade
event.custom({
  "type": "botania:elven_trade",
  "ingredients": [
    {
      "item": "kubejs:liquid_managlass_bucket"
    }
  ],
  "output": [
    {
      "item": "kubejs:blessed_alfglass_bucket"
    }
  ]
})

// Blood Infusion Acid
event.recipes.bloodmagic.altar('kubejs:mucus_bucket', 'biomancy:acid_bucket').upgradeLevel(4).altarSyphon(15000).consumptionRate(150).drainRate(450)

// Recipes for multiblock parts
event.shaped(
  Item.of('mbd2:particle_chroma_in'),
  [
    ' a ',
    'aba',
    ' a '
  ],
  {
    a: 'kubejs:containment_casing',
    b: '#kubejs:prismatter'
  }
)

event.shapeless(Item.of('mbd2:particle_chroma_out'), ['mbd2:particle_chroma_in'])
event.shapeless(Item.of('mbd2:particle_chroma_in'), ['mbd2:particle_chroma_out'])

event.shaped(
  Item.of('mbd2:particle_particles_in'),
  [
    ' a ',
    'aba',
    ' a '
  ],
  {
    a: 'kubejs:containment_casing',
    b: 'botania:open_bucket'
  }
)

event.shapeless(Item.of('mbd2:particle_particles_out'), ['mbd2:particle_particles_in'])
event.shapeless(Item.of('mbd2:particle_particles_in'), ['mbd2:particle_particles_out'])

event.shaped(
  Item.of('mbd2:particle_mana_in'),
  [
    ' a ',
    'aba',
    ' a '
  ],
  {
    a: 'kubejs:containment_casing',
    b: 'botania:corporea_spark_master'
  }
)

event.shaped(
  Item.of('mbd2:particle_temp_in'),
  [
    ' a ',
    'aba',
    ' a '
  ],
  {
    a: 'kubejs:containment_casing',
    b: 'mekanism:superheating_element'
  }
)

event.shaped(
  Item.of('mbd2:particle_extra_in'),
  [
    ' a ',
    'aba',
    ' a '
  ],
  {
    a: 'kubejs:containment_casing',
    b: 'ae2:sky_stone_tank'
  }
)

event.shaped(
  Item.of('mbd2:rainbow_chroma_hatch'),
  [
    ' a ',
    'aba',
    ' a '
  ],
  {
    a: 'kubejs:prisma_dust',
    b: 'mbd2:particle_chroma_in'
  }
)

// Controller recipes
event.recipes.mbd2.passembler()
        .id("mbd2:psplitter") // recipe id is optional, but we recommend to set a unique id
        .duration(600) // duration in tick
        .priority(1) // highest priority will be handled first
        .isFuel(false) // mark this recipe as a fuel recipe
        // item
        .inputItems("16x kubejs:containment_casing", "16x mekanism:electrolytic_core", "4x advanced_ae:quantum_processor", "4x #botania:terrasteel_ingots")
        .outputItems("mbd2:particle_splitter")
        // fluid
        .inputFluids("kubejs:prisma 4000")
        // per tick (consume / generate per tick)
        .perTick(builder => builder
            .inputFE(150000)
        )

event.recipes.mbd2.passembler()
        .id("mbd2:prefiner") // recipe id is optional, but we recommend to set a unique id
        .duration(600) // duration in tick
        .priority(1) // highest priority will be handled first
        .isFuel(false) // mark this recipe as a fuel recipe
        // item
        .inputItems("16x kubejs:containment_casing", "16x ae2:spatial_cell_component_16", "4x advanced_ae:quantum_processor", "4x aetherworks:aether_amalgam")
        .outputItems("mbd2:particle_refiner")
        // fluid
        .inputFluids("kubejs:prisma 4000")
        // per tick (consume / generate per tick)
        .perTick(builder => builder
            .inputFE(150000)
        )

event.recipes.mbd2.passembler()
        .id("mbd2:spectrumrealiser") // recipe id is optional, but we recommend to set a unique id
        .duration(600) // duration in tick
        .priority(1) // highest priority will be handled first
        .isFuel(false) // mark this recipe as a fuel recipe
        // item
        .inputItems("16x kubejs:containment_casing", "kubejs:prismatter_block", "advanced_ae:quantum_storage_component", "4x malum:prismatic_focus_lens")
        .outputItems("mbd2:rainbow_concentrator")
        // fluid
        .inputFluids("kubejs:prisma 4000")
        // per tick (consume / generate per tick)
        .perTick(builder => builder
            .inputFE(150000)
        )

})