GTCEuStartupEvents.registry('gtceu:recipe_type', event => {
    event.create('digesting')
        .setEUIO('in')
        .setMaxIOSize(2, 1, 2, 4)
        .setSlotOverlay(false, false, GuiTextures.SOLIDIFIER_OVERLAY)
        .setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT)
        .setSound(GTSoundEntries.CHEMICAL)
})

GTCEuStartupEvents.registry('gtceu:machine', event => {
    event.create('digestion_tank', 'multiblock', holder => $DigestionTankMachine(holder))
        .rotationState(RotationState.NON_Y_AXIS)
        .recipeType('digesting')
        .recipeModifier((/**@type {$MultiblockControllerMachine}*/machine,/**@type {$GTRecipe}*/recipe,params,result) => {
            return $DigestionTankMachine.recipeModifier(machine,recipe,params,result)
        })
        //.appearanceBlock(Block.getBlock('minecraft:bricks'))
        .pattern(definition => FactoryBlockPattern.start()
            .aisle('CCCCC', 'CAAAC', 'CCCCC')
            .aisle('CCCCC', 'AWWWA', 'CDDDC')
            .aisle('CCCCC', 'CAKAC', 'CGGGC')
            .where('C', Predicates.blocks('minecraft:bricks'))
            .where('K', Predicates.controller(Predicates.blocks(definition.get())))
            .where('D', Predicates.blocks('minecraft:iron_trapdoor'))
            //.where('B',Predicates.abilities(PartAbility.MUFFLER).setExactLimit(1))
            .where('A', Predicates.blocks('minecraft:bricks')
                .or(Predicates.autoAbilities(definition.getRecipeTypes()))
                .or(Predicates.abilities(PartAbility.MAINTENANCE).setExactLimit(1))
            )
            .where('G', Predicates.blocks(GTBlocks.CASING_TEMPERED_GLASS.get()))
            .where('W', Predicates.blocks('minecraft:water'))
            .build()
        )
        .workableCasingRenderer('minecraft:block/bricks', 'gtceu:block/multiblock/implosion_compressor', false)
})