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"))
            keys.add(AEKeyHelper.item("minecraft:white_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:orange_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:magenta_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:light_blue_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:yellow_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:lime_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:pink_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:gray_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:light_gray_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:cyan_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:purple_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:blue_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:brown_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:green_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:red_concrete"))
		    keys.add(AEKeyHelper.item("minecraft:black_concrete"))
		    keys.add(AEKeyHelper.item("gtmthings:programmable_cover"))
		    keys.add(AEKeyHelper.item("gtmthings:max_programmablec_hatch"))
            keys.add(AEKeyHelper.item("minecraft:white_dye"))
            keys.add(AEKeyHelper.item("minecraft:orange_dye"))
            keys.add(AEKeyHelper.item("minecraft:magenta_dye"))
            keys.add(AEKeyHelper.item("minecraft:light_blue_dye"))
            keys.add(AEKeyHelper.item("minecraft:yellow_dye"))
            keys.add(AEKeyHelper.item("minecraft:lime_dye"))
            keys.add(AEKeyHelper.item("minecraft:pink_dye"))
            keys.add(AEKeyHelper.item("minecraft:gray_dye"))
            keys.add(AEKeyHelper.item("minecraft:light_gray_dye"))
            keys.add(AEKeyHelper.item("minecraft:cyan_dye"))
            keys.add(AEKeyHelper.item("minecraft:purple_dye"))
            keys.add(AEKeyHelper.item("minecraft:blue_dye"))
            keys.add(AEKeyHelper.item("minecraft:brown_dye"))
            keys.add(AEKeyHelper.item("minecraft:green_dye"))
            keys.add(AEKeyHelper.item("minecraft:red_dye"))
            keys.add(AEKeyHelper.item("minecraft:black_dye"))
        }))
    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','gtecore:me_steam_hatch'];
            for (var i in items) {
                keys.add(AEKeyHelper.item(items[i]))
            }
            keys.add(AEKeyHelper.item("gtceu:me_stocking_dual_input_hatch"))
            keys.add(AEKeyHelper.item("gtceu:me_stocking_input_bus"))
            keys.add(AEKeyHelper.item("gtceu:me_stocking_input_hatch"))
        }))
    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"))
        }))
})


