//Fluid Ports
MMEvents.registerPorts(event => {
    //Small Fluid Port
    event.create("small_fluid_port")
        .name("Small Fluid Port")
        .controllerId("mm:machine_controller")
        .config("mm:fluid", f => {
            f.rows(1)
                .columns(1)
                .slotCapacity(102400);
        })
    
    //Large Fluid Port
    event.create("large_fluid_port")
        .name("Large Fluid Port")
        .controllerId("mm:machine_controller")
        .config("mm:fluid", f => {
            f.rows(1)
                .columns(3)
                .slotCapacity(5120000);
        })
    
    //Maxed Fluid Port
    event.create("maxed_fluid_port")
        .name("Maxed Fluid Port")
        .controllerId("mm:machine_controller")
        .config("mm:fluid", f => {
            f.rows(1)
                .columns(5)
                .slotCapacity(2147483647);
        })
    
})

//Item Ports
MMEvents.registerPorts(event => {
    //Small Item Port
    event.create("small_item_port")
    .name("Small Item Port")
    .controllerId("mm:machine_controller")
    .config("mm:item", d => {
        d.rows(1)
        .columns(1);
    })

    //Item Port
    event.create("item_port")
    .name("Item Port")
    .controllerId("mm:machine_controller")
    .config("mm:item", d => {
        d.rows(2)
        .columns(2);
    })

    //Large Item Port
    event.create("large_item_port")
    .name("Large Item Port")
    .controllerId("mm:machine_controller")
    .config("mm:item", d => {
        d.rows(3)
        .columns(3);
    })

    //Huge Item Port
    event.create("huge_item_port")
    .name("Huge Item Port")
    .controllerId("mm:machine_controller")
    .config("mm:item", d => {
        d.rows(4)
        .columns(4);
    })

    //Maxed Item Port
    event.create("maxed_item_port")
    .name("Maxed Item Port")
    .controllerId("mm:machine_controller")
    .config("mm:item", d => {
        d.rows(5)
        .columns(5);
    })

})

//Power Ports
MMEvents.registerPorts(event => {//Small Power Port
    event.create("small_power_port")
        .name("Small Power Port")
        .controllerId("mm:machine_controller")
        .config("mm:energy", c => {
            c.capacity(102400)
                .maxReceive(20480)
                .maxExtract(20480);
        })
        
    //Power Port
    event.create("power_port")
        .name("Power Port")
        .controllerId("mm:machine_controller")
        .config("mm:energy", c => {
            c.capacity(512000)
                .maxReceive(102400)
                .maxExtract(102400);
        })
        
    //Large Power Port
    event.create("large_power_port")
        .name("Large Power Port")
        .controllerId("mm:machine_controller")
        .config("mm:energy", c => {
            c.capacity(2560000)
                .maxReceive(512000)
                .maxExtract(512000);
        })
        
    //Huge Power Port
    event.create("huge_power_port")
        .name("Huge Power Port")
        .controllerId("mm:machine_controller")
        .config("mm:energy", c => {
            c.capacity(12800000)
                .maxReceive(2560000)
                .maxExtract(2560000);
        })
        
    //Maxed Power Port
    event.create("maxed_power_port")
        .name("Maxed Power Port")
        .controllerId("mm:machine_controller")
        .config("mm:energy", c => {
            c.capacity(2147483647)
                .maxReceive(2147483647)
                .maxExtract(2147483647);
        })
    
})