// Controllers
MMEvents.registerControllers(event => {
  event.create('chem_dissolver_centrifuge')
    .name('Dissolver Centrifuge')
    .type('mm:machine')

  event.create('chem_compressor')
    .name('Chemical Compressor')
    .type('mm:machine')
})

// Ports (no mode port now)
MMEvents.registerPorts(event => {
  // Universal Multiblock Energy Port 
  event.create('alchem_fe')
    .name('FE Port')
    .controllerId('mm:chem_dissolver_centrifuge')
    .controllerId('mm:chem_compressor')
    .config('mm:energy', c => {
      c.capacity(4000000)
      c.maxReceive(8000)
      c.maxExtract(8000)
    })

  // Dissolver Centrifuge input port (1×5)
  event.create('centrifuge_item')
    .name('Dissolver Centrifuge')
    .controllerId('mm:chem_dissolver_centrifuge')
    .config('mm:item', c => c.rows(1).columns(5))

  // Universal Multiblock Item Port for Outputs (5x9)
  event.create('alchem_item')
    .name('Alchemy Multiblock Item')
    .controllerId('mm:chem_compressor')
    .controllerId('mm:chem_dissolver_centrifuge')
    .config('mm:item', c => c.rows(5).columns(9))

  // Chemical Compressor Input Slot (2x2)
  event.create('cc_compressor')
    .name('Chemical Compressor')
    .controllerId('mm:chem_compressor')
    .config('mm:item', c => c.rows(2).columns(2))

  // Target selector slot (1×1, non-consuming): Specifically for the Chemical Compressor
event.create('cc_target')
  .name('Target Port (Not Consumed)')
  .controllerId('mm:chem_compressor')
  .config('mm:item', c => {
    c.rows(1).columns(1)
  })
})