MMEvents.createProcesses(event => {
    function drainer(itemInput, fluidAmount, energyAmount, time, recipeId) {    
        event.create("mm:" + recipeId)
        .structureId("mm:blood_drainer")
        .ticks(time)
        .input({
            type: "mm:input/consume",
            ingredient: {
                type: "mm:item",
                item: itemInput,
                count: 1
            }
        })
        .input({
            type: "mm:input/consume",
            per_tick: true,
            ingredient: {
                "type": "mm:energy",
                "amount": energyAmount
            }
        })        
        .output({
            type: "mm:output/simple",
            ingredient: {
                type: "mm:fluid",
                fluid: "evilcraft:blood",
                amount: fluidAmount
            }
        })
    }

    drainer('minecraft:rotten_flesh', 1000, 1000, 100, 'rotten_flesh')
    drainer('reliquary:zombie_heart', 250, 1000, 100, 'reliquary/zombie_heart')
    drainer('eidolon:zombie_heart', 1250, 1000, 100, 'eidolon/zombie_heart')
})