StartupEvents.registry("item", event => {
    event.create("infinite_programmed_circuit", "meinfinitycell:infinities_cell")
        .setName(Component.translatable("item.kubejs.infinite_programmed_circuit"))
        .texture('kubejs:item/programmed_cell')
        .setKeys(KeyList.of().adds(keys => {
            for (let i = 1; i <= 32; i++) {
                keys.add(AEKeyHelper.item('gtceu:programmed_circuit', "{Configuration:" + i + "}"))
            }
        }))
    event.create("infinities_sfm", "meinfinitycell:infinities_cell")
        .setName(Text.literal("sfm"))
        .texture('kubejs:item/sfm')
        .setKeys(KeyList.of().adds(keys => {
            keys.add(AEKeyHelper.item("sfm:manager"))
            keys.add(AEKeyHelper.item("sfm:cable"))
            keys.add(AEKeyHelper.item("sfm:fancy_cable"))
            keys.add(AEKeyHelper.item("sfm:printing_press"))
            keys.add(AEKeyHelper.item("sfm:water_tank"))
            keys.add(AEKeyHelper.item("sfm:disk"))
            keys.add(AEKeyHelper.item("sfm:labelgun"))
            keys.add(AEKeyHelper.item("sfm:network_tool"))
            keys.add(AEKeyHelper.item("sfm:form"))
            keys.add(AEKeyHelper.item("sfm:xp_shard"))
            keys.add(AEKeyHelper.item("sfm:xp_goop"))
        }))
    event.create("infinities_pipez", "meinfinitycell:infinities_cell")
        .setName(Text.literal("pipez"))
        .texture('kubejs:item/pipez')
        .setKeys(KeyList.of().adds(keys => {
            keys.add(AEKeyHelper.item("pipez:basic_upgrade"))
            keys.add(AEKeyHelper.item("pipez:improved_upgrade"))
            keys.add(AEKeyHelper.item("pipez:advanced_upgrade"))
            keys.add(AEKeyHelper.item("pipez:ultimate_upgrade"))
            keys.add(AEKeyHelper.item("pipez:infinity_upgrade"))
            keys.add(AEKeyHelper.item("pipez:wrench"))
            keys.add(AEKeyHelper.item("pipez:filter_destination_tool"))
            keys.add(AEKeyHelper.item("pipez:item_pipe"))
            keys.add(AEKeyHelper.item("pipez:fluid_pipe"))
            keys.add(AEKeyHelper.item("pipez:energy_pipe"))
            keys.add(AEKeyHelper.item("pipez:universal_pipe"))
            keys.add(AEKeyHelper.item("pipez:gas_pipe"))
        }))
    event.create("infinities_mc", "meinfinitycell:infinities_cell")
        .setName(Text.literal("基础"))
        .texture('kubejs:item/mc')
        .setKeys(KeyList.of().adds(keys => {
            keys.add(AEKeyHelper.item("minecraft:cobblestone"))
            keys.add(AEKeyHelper.item("minecraft:dirt"))
            keys.add(AEKeyHelper.item("minecraft:grass_block"))
            keys.add(AEKeyHelper.item("minecraft:sand"))
            keys.add(AEKeyHelper.item("minecraft:gravel"))
            keys.add(AEKeyHelper.item("minecraft:clay_ball"))
        }))
    event.create("infinities_laserio", "meinfinitycell:infinities_cell")
        .setName(Text.literal("laserio"))
        .texture('kubejs:item/laserio')
        .setKeys(KeyList.of().adds(keys => {
            keys.add(AEKeyHelper.item("laserio:laser_connector"))
            keys.add(AEKeyHelper.item("laserio:laser_node"))
            keys.add(AEKeyHelper.item("laserio:laser_connector_advanced"))
            keys.add(AEKeyHelper.item("laserio:laser_wrench"))
            keys.add(AEKeyHelper.item("laserio:card_holder"))
            keys.add(AEKeyHelper.item("laserio:card_cloner"))
            keys.add(AEKeyHelper.item("laserio:card_item"))
            keys.add(AEKeyHelper.item("laserio:card_fluid"))
            keys.add(AEKeyHelper.item("laserio:card_energy"))
            keys.add(AEKeyHelper.item("laserio:card_redstone"))
            keys.add(AEKeyHelper.item("laserio:filter_basic"))
            keys.add(AEKeyHelper.item("laserio:filter_count"))
            keys.add(AEKeyHelper.item("laserio:filter_tag"))
            keys.add(AEKeyHelper.item("laserio:filter_mod"))
            keys.add(AEKeyHelper.item("laserio:filter_nbt"))
            keys.add(AEKeyHelper.item("laserio:logic_chip_raw"))
            keys.add(AEKeyHelper.item("laserio:logic_chip"))
            keys.add(AEKeyHelper.item("laserio:overclocker_card"))
            keys.add(AEKeyHelper.item("laserio:overclocker_node"))
        }))
    event.create("infinities_ae", "meinfinitycell:infinities_cell")
        .setName(Text.literal("AE"))
        .texture('kubejs:item/ae')
        .setKeys(KeyList.of().adds(keys => {
            var items = ['ae2:redstone_card', 'ae2:capacity_card', 'ae2:void_card', 'ae2:fuzzy_card', 'ae2:speed_card', 'ae2:inverter_card', 'ae2:crafting_card', 'ae2:equal_distribution_card', 'ae2:fluix_glass_cable', 'ae2:fluix_smart_cable', 'ae2:fluix_smart_dense_cable', 'ae2:fluix_covered_dense_cable', 'advanced_ae:quantum_unit', 'advanced_ae:quantum_core', 'advanced_ae:quantum_storage_256', 'advanced_ae:data_entangler', 'advanced_ae:quantum_accelerator', 'advanced_ae:quantum_multi_threader', 'advanced_ae:quantum_structure', 'advanced_ae:quantum_crafter', 'expatternprovider:ex_pattern_provider', 'expatternprovider:ex_interface', 'expatternprovider:oversize_interface', 'expatternprovider:assembler_matrix_frame', 'expatternprovider:assembler_matrix_wall', 'expatternprovider:assembler_matrix_pattern', 'expatternprovider:assembler_matrix_crafter', 'expatternprovider:assembler_matrix_speed', 'expatternprovider:assembler_matrix_glass', 'advanced_ae:import_export_bus_part', 'gtceu:me_input_bus', 'gtceu:me_output_bus', 'gtceu:me_input_hatch', 'gtceu:me_output_hatch', 'gtmthings:me_export_buffer', 'gtceu:me_pattern_buffer', 'gtceu:me_pattern_buffer_proxy', 'gtceu:data_stick', 'expatternprovider:ex_import_bus_part', 'expatternprovider:ex_export_bus_part', 'aewireless:wireless_transceiver'];
            for (var i in items) {
                keys.add(AEKeyHelper.item(items[i]))
            }
        }))
    event.create("infinities_water_lava", "meinfinitycell:infinities_cell")
        .setName(Text.literal("水/熔岩"))
        .texture('kubejs:item/water_lava')
        .setKeys(KeyList.of().adds(keys => {
            keys.add(AEKeyHelper.fluid("minecraft:water"))
            keys.add(AEKeyHelper.fluid("minecraft:lava"))
        }))
})


