
GTCEuStartupEvents.registry('gtceu:machine', event => {
    event.create('hyper_assembly_line', 'multiblock')
        .rotationState(RotationState.NON_Y_AXIS)
        .recipeType("assembly_line")
        .recipeModifiers([GTRecipeModifiers.PARALLEL_HATCH, GTRecipeModifiers.OC_PERFECT_SUBTICK, GTRecipeModifiers.BATCH_MODE])
        .appearanceBlock(() => Block.getBlock('kubejs:eternity_casing'))
        .pattern(definition => FactoryBlockPattern.start()
            .aisle("##BBBBB##", "#########", "#########", "#########", "#########", "#########", "#########", "#########", "#########", "#########", "##BBBBB##")
            .aisle("#BBBBBBB#", "#C#DDD#C#", "#C#FFF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FFF#C#", "#C#DDD#C#", "#BBBBBBB#")
            .aisle("BBBBBBBBB", "##D###D##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##D###D##", "BBBBBBBBB")
            .aisle("BBBBBBBBB", "#D#DDD#D#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#D#DDD#D#", "BBBBBBBBB")
            .aisle("BBBBBBBBB", "#D#DDD#D#", "#FG#E#GF#", "#HG#E#GH#", "#HG#E#GH#", "#HG#E#GH#", "#HG#E#GH#", "#HG#E#GH#", "#FG#E#GF#", "#D#DDD#D#", "BBBBBBBBB")
            .aisle("BBBBBBBBB", "#D#DDD#D#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#D#DDD#D#", "BBBBBBBBB")
            .aisle("BBBBBBBBB", "##D###D##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##D###D##", "BBBBBBBBB")
            .aisle("#BBBBBBB#", "#C#DDD#C#", "#C#FKF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FFF#C#", "#C#DDD#C#", "#BBBBBBB#")
            .aisle("##BBBBB##", "#########", "#########", "#########", "#########", "#########", "#########", "#########", "#########", "#########", "##BBBBB##")
            .where('#', Predicates.any())
            .where('K', Predicates.controller(Predicates.blocks(definition.get())))
            .where('B', Predicates.blocks("kubejs:highly_reinforced_radioactive_casing"))
            .where('C', Predicates.blocks("gtceu:pure_cosmic_matter_frame"))
            .where('D', Predicates.blocks("kubejs:stellar_powered_casing"))
            .where('E', Predicates.blocks("kubejs:trascendental_space_time_casing"))
            .where('H', Predicates.blocks("gtceu:eternity_frame"))
            .where('G', Predicates.blocks("antiblocksrechiseled:bright_white"))
            .where('F', Predicates.blocks("kubejs:eternity_casing")
            .or(Predicates.autoAbilities(definition.getRecipeTypes()))
            .or(Predicates.abilities(PartAbility.MAINTENANCE))
            .or(Predicates.abilities(PartAbility.EXPORT_ITEMS, PartAbility.EXPORT_FLUIDS, PartAbility.IMPORT_ITEMS, PartAbility.IMPORT_FLUIDS, PartAbility.INPUT_LASER, PartAbility.INPUT_ENERGY, PartAbility.PARALLEL_HATCH))
            )
            .build()
        )
        .workableCasingModel("kubejs:block/casings/eternity_casing", 'gtceu:block/machines/replicator')


        event.create('hyper_assembler', 'multiblock')
        .rotationState(RotationState.NON_Y_AXIS)
        .recipeType("assembler")
        .recipeModifiers([GTRecipeModifiers.PARALLEL_HATCH, GTRecipeModifiers.OC_PERFECT_SUBTICK, GTRecipeModifiers.BATCH_MODE])
        .appearanceBlock(() => Block.getBlock('kubejs:eternity_casing'))
        .pattern(definition => FactoryBlockPattern.start()
            .aisle("##BBBBB##", "#########", "#########", "#########", "#########", "#########", "#########", "#########", "#########", "#########", "##BBBBB##")
            .aisle("#BBBBBBB#", "#C#DDD#C#", "#C#FFF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FFF#C#", "#C#DDD#C#", "#BBBBBBB#")
            .aisle("BBBBBBBBB", "##D###D##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##D###D##", "BBBBBBBBB")
            .aisle("BBBBBBBBB", "#D#DDD#D#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#D#DDD#D#", "BBBBBBBBB")
            .aisle("BBBBBBBBB", "#D#DDD#D#", "#FG#E#GF#", "#HG#E#GH#", "#HG#E#GH#", "#HG#E#GH#", "#HG#E#GH#", "#HG#E#GH#", "#FG#E#GF#", "#D#DDD#D#", "BBBBBBBBB")
            .aisle("BBBBBBBBB", "#D#DDD#D#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#FG###GF#", "#D#DDD#D#", "BBBBBBBBB")
            .aisle("BBBBBBBBB", "##D###D##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##FGGGF##", "##D###D##", "BBBBBBBBB")
            .aisle("#BBBBBBB#", "#C#DDD#C#", "#C#FKF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FHF#C#", "#C#FFF#C#", "#C#DDD#C#", "#BBBBBBB#")
            .aisle("##BBBBB##", "#########", "#########", "#########", "#########", "#########", "#########", "#########", "#########", "#########", "##BBBBB##")
            .where('#', Predicates.any())
            .where('K', Predicates.controller(Predicates.blocks(definition.get())))
            .where('B', Predicates.blocks("kubejs:highly_reinforced_radioactive_casing"))
            .where('C', Predicates.blocks("gtceu:pure_cosmic_matter_frame"))
            .where('D', Predicates.blocks("kubejs:stellar_powered_casing"))
            .where('E', Predicates.blocks("kubejs:trascendental_space_time_casing"))
            .where('H', Predicates.blocks("gtceu:eternity_frame"))
            .where('G', Predicates.blocks("antiblocksrechiseled:bright_white"))
            .where('F', Predicates.blocks("kubejs:eternity_casing")
            .or(Predicates.autoAbilities(definition.getRecipeTypes()))
            .or(Predicates.abilities(PartAbility.MAINTENANCE))
            .or(Predicates.abilities(PartAbility.EXPORT_ITEMS, PartAbility.EXPORT_FLUIDS, PartAbility.IMPORT_ITEMS, PartAbility.IMPORT_FLUIDS, PartAbility.INPUT_LASER, PartAbility.INPUT_ENERGY, PartAbility.PARALLEL_HATCH))
            )
            .build()
        )
        .workableCasingModel("kubejs:block/casings/eternity_casing", 'gtceu:block/machines/assembler')
})
