ServerEvents.recipes(event => {

    //Blood Drainer
    event.shaped({
      "type": "forge:nbt",
      "item": "custommachinery:custom_machine_item",
      "count": 1,
      "nbt": "{machine:\"mystian:blood_drainer\"}"
    },
    ['DDD', 'DAD', 'DBD'], {
    D: 'evilcraft:dark_power_gem_block',  // Represents dark power and strength
    A: 'minecraft:beacon',                // Central beacon for control
    B: 'evilcraft:spiked_plate'           // For the draining mechanism
  }).id('impostor:blood_drainer')
  
      //Blood Drainer Structure/Function
          function drainer(itemInput, fluidAmount, energyAmount, time, recipeId) {
            event.custom({
              "type": "custommachinery:custom_machine",
              "machine": "mystian:blood_drainer",
              "time": time,
              "requirements": [
              {
                  "type": "custommachinery:energy_per_tick",
                  "mode": "input",
                  "amount": energyAmount
              },
              {
                  "type": "custommachinery:item",
                  "id": "iteminput",
                  "mode": "input",
                  "item": itemInput,
                  "amount": 1
              },
              {
                  "type": "custommachinery:fluid",
                  "id": "fluidoutput",
                  "mode": "output",
                  "fluid": "evilcraft:blood",
                  "amount": fluidAmount
              },
              {
                "type": "custommachinery:structure",
                "pattern": [
                  ["       ", " AAAAA ", " ADDDA ", " ADDDA ", " ADDDA ", " AAAAA ", "   m   "],
                  ["       ", " AAAAA ", " FGGGF ", " FGGGF ", " FGGGF ", " AFFFA ", "       "],
                  ["       ", " AAAAA ", " F   F ", " F   F ", " F   F ", " AFFFA ", "       "],
                  ["       ", " AAAAA ", " F   F ", " F   F ", " F   F ", " AFFFA ", "       "],
                  ["JJJJJJJ", "JAAAAAJ", "JAKKKAJ", "JAKKKAJ", "JAKKKAJ", "JAAAAAJ", "JJJJJJJ"],
                  ["       ", " JJJJJ ", " JAAAJ ", " JALAJ ", " JAAAJ ", " JJJJJ ", "       "],
                  ["       ", "       ", "  JJJ  ", "  JMJ  ", "  JJJ  ", "       ", "       "]
                ],
                "keys": {
                    "A": "evilcraft:dark_blood_brick",
                    "D": "evilcraft:dark_power_gem_block",
                    "F": "mob_grinding_utils:tinted_glass",
                    "G": "evilcraft:spiked_plate",
                    "J": "evilcraft:dark_blood_brick",
                    "K": "minecraft:netherite_block",
                    "L": "minecraft:beacon",
                    "M": "minecraft:red_stained_glass"
                }
              }
              
              ]
          }).id('mystian:drainer/' + recipeId)
        }
  
      //Blood Drainer Recipes
      drainer('minecraft:rotten_flesh', 250, 1000, 100, 'rotten_flesh')
      drainer('reliquary:zombie_heart', 750, 1000, 100, 'reliquary/zombie_heart')
      drainer('eidolon:zombie_heart', 1000, 1000, 100, 'eidolon/zombie_heart')
      
        event.custom({
          "type": "custommachinery:custom_machine",
          "machine": "mystian:blood_drainer",
          "time": 25,
          "requirements": [
          {
              "type": "custommachinery:energy_per_tick",
              "mode": "input",
              "amount": 1250
          },
          {
              "type": "custommachinery:item",
              "id": "iteminput",
              "mode": "input",
              "item": "productivebees:configurable_honeycomb",
              "nbt": {
                  "EntityTag": {
                      "type": "productivebees:bloody"
                  }
              },
              "amount": 1
          },
          {
              "type": "custommachinery:fluid",
              "id": "fluidoutput",
              "mode": "output",
              "fluid": "evilcraft:blood",
              "amount": 500
          },
          {
            "type": "custommachinery:structure",
            "pattern": [
              ["       ", " AAAAA ", " ADDDA ", " ADDDA ", " ADDDA ", " AAAAA ", "   m   "],
              ["       ", " AAAAA ", " FGGGF ", " FGGGF ", " FGGGF ", " AFFFA ", "       "],
              ["       ", " AAAAA ", " F   F ", " F   F ", " F   F ", " AFFFA ", "       "],
              ["       ", " AAAAA ", " F   F ", " F   F ", " F   F ", " AFFFA ", "       "],
              ["JJJJJJJ", "JAAAAAJ", "JAKKKAJ", "JAKKKAJ", "JAKKKAJ", "JAAAAAJ", "JJJJJJJ"],
              ["       ", " JJJJJ ", " JAAAJ ", " JALAJ ", " JAAAJ ", " JJJJJ ", "       "],
              ["       ", "       ", "  JJJ  ", "  JMJ  ", "  JJJ  ", "       ", "       "]
            ],
            "keys": {
                "A": "evilcraft:dark_blood_brick",
                "D": "evilcraft:dark_power_gem_block",
                "F": "mob_grinding_utils:tinted_glass",
                "G": "evilcraft:spiked_plate",
                "J": "evilcraft:dark_blood_brick",
                "K": "minecraft:netherite_block",
                "L": "minecraft:beacon",
                "M": "minecraft:red_stained_glass"
            }
          }
          
          ]
      }).id('mystian:drainer/bloody_comb')
  
  })