// Scripts for hiding items from JEI

ServerEvents.tags('item', event => {

// ext singularities
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:singularity')
	
// ext catalysts
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:basic_catalyst')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:advanced_catalyst')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:elite_catalyst')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ultimate_catalyst')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:redstone_catalyst')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:enhanced_redstone_catalyst')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ender_catalyst')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:enhanced_ender_catalyst')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:crystaltine_catalyst')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:the_ultimate_catalyst')

// ext comps
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ultimate_component')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:redstone_component')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:enhanced_redstone_component')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ender_component')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:enhanced_ender_component')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:crystaltine_component')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:the_ultimate_component')

// ext nuggets
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:redstone_nugget')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:enhanced_redstone_nugget')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ender_nugget')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:enhanced_ender_nugget')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:crystaltine_nugget')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:the_ultimate_nugget')

// ext ingots
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:redstone_ingot')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ender_ingot')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:enhanced_ender_ingot')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:the_ultimate_ingot')

// ext blocks
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:redstone_ingot_block')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:enhanced_redstone_ingot_block')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ender_ingot_block')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:enhanced_ender_ingot_block')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:crystaltine_block')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:the_ultimate_block')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:nether_star_block')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:flux_star_block')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ender_star_block')

// ext machines
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:elite_auto_table')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ultimate_auto_table')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:compressor')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ender_alternator')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ender_crafter')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:auto_ender_crafter')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:flux_alternator')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:flux_crafter')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:auto_flux_crafter')

// ext misc
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ender_star')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ultimate_singularity')

// projex klein
const klein_stars = event.get('curios:klein_star').getObjectIds()
const klein_blacklist = Ingredient.of(/.*klein_star.*/)

klein_stars.forEach(klein_star => {
    if (!klein_blacklist.test(klein_star)) event.add('c:hidden_from_recipe_viewers', klein_star)
 })

event.add('c:hidden_from_recipe_viewers', '#projectexpansion:matter')
event.add('c:hidden_from_recipe_viewers', '#projectexpansion:collector')
event.add('c:hidden_from_recipe_viewers', '#projectexpansion:compressed_collector')
event.add('c:hidden_from_recipe_viewers', '#projectexpansion:relay')
event.add('c:hidden_from_recipe_viewers', '#projectexpansion:fuel')

const flower_colours = ["purple", "cyan", "green", "lime", "yellow", "orange", "white", "fading", "final"]
flower_colours.forEach(flower => {
	event.add('c:hidden_from_recipe_viewers', 'projectexpansion:'+flower+'_power_flower')
	event.add('c:hidden_from_recipe_viewers', 'projectexpansion:'+flower+'_emc_link')
})

const matter_colours = ["magenta", "pink", "purple", "violet", "blue", "cyan", "green", "lime", "yellow", "orange", "white", "fading", "final"]
matter_colours.forEach(matter => {
	event.add('c:hidden_from_recipe_viewers', 'projectexpansion:'+matter+'_matter_block')
	event.add('c:hidden_from_recipe_viewers', 'projectexpansion:'+matter+'_fuel_block')
})

// KubeJS placeholder blocks
event.add('c:hidden_from_recipe_viewers', 'kubejs:pcasinginputbus')
event.add('c:hidden_from_recipe_viewers', 'kubejs:pcasinginputhatch')
event.add('c:hidden_from_recipe_viewers', 'kubejs:pcasingoutputbus')
event.add('c:hidden_from_recipe_viewers', 'kubejs:pcasingfluxinput')
event.add('c:hidden_from_recipe_viewers', 'kubejs:pcasingmanainput')
event.add('c:hidden_from_recipe_viewers', 'kubejs:pcasingcoolantinput')
event.add('c:hidden_from_recipe_viewers', 'kubejs:palloyerinactive')
event.add('c:hidden_from_recipe_viewers', 'kubejs:palloyeractive')
event.add('c:hidden_from_recipe_viewers', 'kubejs:passemblerinactive')
event.add('c:hidden_from_recipe_viewers', 'kubejs:passembleractive')
event.add('c:hidden_from_recipe_viewers', 'kubejs:pritualiserinactive')
event.add('c:hidden_from_recipe_viewers', 'kubejs:pritualiseractive')
event.add('c:hidden_from_recipe_viewers', 'kubejs:cosmicchannelerinactive')
event.add('c:hidden_from_recipe_viewers', 'kubejs:cosmicchanneleractive')

event.add('c:hidden_from_recipe_viewers', 'kubejs:fission_reactor_membrane_field')
event.add('c:hidden_from_recipe_viewers', 'kubejs:fission_reactor_input_bus')
event.add('c:hidden_from_recipe_viewers', 'kubejs:fission_reactor_input_hatch')
event.add('c:hidden_from_recipe_viewers', 'kubejs:fission_reactor_output_bus')
event.add('c:hidden_from_recipe_viewers', 'kubejs:fission_reactor_output_hatch')
event.add('c:hidden_from_recipe_viewers', 'kubejs:crystal_chamber_controller')
event.add('c:hidden_from_recipe_viewers', 'kubejs:crystal_chamber_port')
event.add('c:hidden_from_recipe_viewers', 'kubejs:lapidary_controller')
event.add('c:hidden_from_recipe_viewers', 'kubejs:lapidary_flux_port')
event.add('c:hidden_from_recipe_viewers', 'kubejs:lapidary_port_hatch')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_compressioncontrollerinactive')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_compressioncontrolleractive')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_compressioninputhatch')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_compressionfluxport')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_compressionheatvent')
event.add('c:hidden_from_recipe_viewers', 'kubejs:prismatic_quantiser_controller')
event.add('c:hidden_from_recipe_viewers', 'kubejs:sky_stone_prisma_input_hatch')
event.add('c:hidden_from_recipe_viewers', 'kubejs:sky_stone_item_input_bus')
event.add('c:hidden_from_recipe_viewers', 'kubejs:sky_stone_item_output_bus')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_bloodinputhatch')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_bloodoutputhatch')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_bloodinputbus')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_bloodcontrolleroff')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_bloodcontrolleron')

event.add('c:hidden_from_recipe_viewers', 'kubejs:rune_factory')
event.add('c:hidden_from_recipe_viewers', 'kubejs:alchemy_box')
event.add('c:hidden_from_recipe_viewers', 'kubejs:blood_box')
event.add('c:hidden_from_recipe_viewers', 'kubejs:black_box_inactive')
event.add('c:hidden_from_recipe_viewers', 'kubejs:black_box_active')
event.add('c:hidden_from_recipe_viewers', 'kubejs:black_box_flux_port')
event.add('c:hidden_from_recipe_viewers', 'kubejs:black_energy_box')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_prismasolarcontroller')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_extendedcrafter')

// Ext Crafting tables
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:basic_table')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:advanced_table')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:elite_table')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:ultimate_table')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:basic_auto_table')
event.add('c:hidden_from_recipe_viewers', 'extendedcrafting:advanced_auto_table')

// Chroma placeholders
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_cpractive')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_cprinactive')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_cprhatch')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_cprport')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_chroma')
event.add('c:hidden_from_recipe_viewers', 'kubejs:placeholder_chromahatch')

// AE2 Facades
event.add('c:hidden_from_recipe_viewers', 'ae2:facade')

})