/*PROBLEME A REGLER

TEXTURE ANIME ULTIMATE ESSENCE
*/

PlayerEvents.loggedIn(event => {
  const player = event.player

  if (!player.stages.has('starting_items')) {
    player.stages.add('starting_items')

    // Donne des objets
    player.give(Item.of('minecraft:cooked_beef', 64))
    player.give(Item.of('eccentrictome:tome', '{"eccentrictome:mods":{ad_astra:{0:{Count:1b,id:"patchouli:guide_book",tag:{"patchouli:book":"ad_astra:astrodux"}}},apotheosis:{0:{Count:1b,id:"patchouli:guide_book",tag:{"patchouli:book":"apotheosis:apoth_chronicle"}}},buildinggadgets2:{0:{Count:1b,id:"patchouli:guide_book",tag:{"patchouli:book":"buildinggadgets2:buildinggadgets2book"}}},cyclic:{0:{Count:1b,id:"patchouli:guide_book",tag:{"patchouli:book":"cyclic:guide_book"}}},extendedcrafting:{0:{Count:1b,id:"patchouli:guide_book",tag:{"patchouli:book":"extendedcrafting:guide"}}},industrialforegoing:{0:{Count:1b,id:"patchouli:guide_book",tag:{"patchouli:book":"industrialforegoing:industrial_foregoing"}}},mysticalagriculture:{0:{Count:1b,id:"patchouli:guide_book",tag:{"patchouli:book":"mysticalagriculture:guide"}}},packagedauto:{0:{Count:1b,id:"patchouli:guide_book",tag:{"patchouli:book":"packagedauto:guide"}}},pneumaticcraft:{0:{Count:1b,id:"patchouli:guide_book",tag:{"patchouli:book":"pneumaticcraft:book"}}}}}'))
  }
})

ServerEvents.recipes(event => {

    event.smelting('kubejs:fire', 'minecraft:flint_and_steel')
  
    event.shaped('projecte:philosophers_stone', [
      'CBC', 
      'BAB',
      'CBC'
    ], {
      A: 'minecraft:red_wool',
      B: 'allthecompressed:cobblestone_2x',
      C: 'allthecompressed:oak_log_2x'
    })

    event.shaped('storagedrawers:creative_storage_upgrade', [
      'AAA', 
      'AAA',
      'AAA'
    ], {
      A: 'storagedrawers:emerald_storage_upgrade',
    })
    
    event.shaped('storagedrawers:emerald_storage_upgrade', [
      'AAA', 
      'AAA',
      'AAA'
    ], {
      A: 'storagedrawers:diamond_storage_upgrade',
    })

    event.shaped('storagedrawers:diamond_storage_upgrade', [
      'AAA', 
      'AAA',
      'AAA'
    ], {
      A: 'storagedrawers:gold_storage_upgrade',
    })

    event.shaped('storagedrawers:gold_storage_upgrade', [
      'AAA', 
      'AAA',
      'AAA'
    ], {
      A: 'storagedrawers:iron_storage_upgrade',
    })

    event.shaped('mystical_extended_tier:ornium_essence', [
      ' A ',
      'BCB',
      ' A '
    ], {
      A: 'mysticalagriculture:awakened_supremium_essence',
      B: 'mysticalagradditions:insanium_essence',
      C: '#mysticalagriculture:infusion_crystals'
    })

    event.shaped('mysticalagriculture:prosperity_shard', [
      ' A ',
      'ABA',
      ' A '
    ], {
      A: 'minecraft:feather',
      B: 'minecraft:iron_block'
    })

    event.shaped('extendedcrafting:the_ultimate_catalyst', [
      ' A ',
      'ABA',
      ' A '
    ], {
      A:'extendedcrafting:the_ultimate_component',
      B:'avaritia:neutron_gear'
    })

    event.shapeless('extendedcrafting:basic_component', [
      'extendedcrafting:luminessence',
      'extendedcrafting:black_iron_slate',
      Item.of('powah:steel_energized', 2)
      
    ])

    event.shapeless('extendedcrafting:advanced_component', [
      'extendedcrafting:luminessence',
      'extendedcrafting:black_iron_slate',
      Item.of('powah:crystal_blazing', 2)
      
    ])

    event.shapeless('extendedcrafting:elite_component', [
      'extendedcrafting:luminessence',
      'extendedcrafting:black_iron_slate',
      Item.of('powah:crystal_niotic', 2)
      
    ])

    event.shapeless('extendedcrafting:ultimate_component', [
      'extendedcrafting:luminessence',
      'extendedcrafting:black_iron_slate',
      Item.of('powah:crystal_spirited', 2)
      
    ])

    event.shaped('extendedcrafting:basic_catalyst', [
      ' A ',
      'ABA',
      ' A '
    ], {
      A:'extendedcrafting:basic_component',
      B:'thermal:invar_gear'
    })

    event.shaped('extendedcrafting:advanced_catalyst', [
      ' A ',
      'ABA',
      ' A '
    ], {
      A:'extendedcrafting:advanced_component',
      B:'thermal:lumium_gear'
    })

    event.shaped('extendedcrafting:elite_catalyst', [
      ' A ',
      'ABA',
      ' A '
    ], {
      A:'extendedcrafting:elite_component',
      B:'thermal:sapphire_gear'
    })

    event.shaped('extendedcrafting:ultimate_catalyst', [
      ' A ',
      'ABA',
      ' A '
    ], {
      A:'extendedcrafting:ultimate_component',
      B:'thermal:emerald_gear'
    })

    event.shaped('thermal:sapphire_gear', [
      ' A ',
      'ABA',
      ' A '
    ], {
      A:'thermal:sapphire',
      B:'minecraft:iron_nugget'
    })

    event.shapeless('kubejs:rainbow_coal_block', [
      Item.of('ironfurnaces:rainbow_coal', 9)
    ])

    event.shapeless(Item.of('ironfurnaces:rainbow_coal', 9), [
      'kubejs:rainbow_coal_block'
    ])

    event.shapeless('kubejs:antimatter_block', [
      Item.of('mekanism:pellet_antimatter', 9)
    ])
    
    event.shapeless(Item.of('mekanism:pellet_antimatter', 9), [
      'kubejs:antimatter_block'
    ])
    
    event.shaped('projectexpansion:final_star', [
      'AAA',
      'ABA',
      'AAA'
    ], {
      A: 'projectexpansion:final_power_flower',
      B: 'avaritia:infinity_catalyst'
    })

    event.shapeless('kubejs:creative_block', [
      Item.of('kubejs:creative_ingot', 9)
    ])
    
    event.shapeless(Item.of('kubejs:creative_ingot', 9), [
      'kubejs:creative_block'
    ])

    event.shaped('minecraft:hopper', [
      'A A',
      'ABA',
      ' A '
    ], {
      A:'minecraft:iron_ingot',
      B:'cyclic:hopper'
    })

    event.shaped('cyclic:hopper_gold', [
      'A A',
      'ABA',
      ' A '
    ], {
      A:'minecraft:gold_ingot',
      B:'minecraft:hopper'
    })

    event.shaped('botanypots:terracotta_hopper_botany_pot', [
      'ABA',
      'ACA',
      ' A '
    ], {
      A:'minecraft:terracotta',
      B:'cyclic:hopper_gold',
      C:'minecraft:flower_pot'
    })
  
    event.shaped('botanypotstiers:elite_terracotta_hopper_botany_pot', [
      '   ',
      ' A ',
      'BCB'
    ], {
      A:'avaritia:endest_pearl',
      B:'minecraft:netherite_block',
      C:'botanypots:terracotta_hopper_botany_pot',
    })

    event.shaped('botanypotstiers:ultra_terracotta_hopper_botany_pot', [
      '   ',
      ' A ',
      'BCB'
    ], {
      A:'avaritia:infinity_catalyst',
      B:'avaritia:neutron',
      C:'botanypotstiers:elite_terracotta_hopper_botany_pot',
    })

    event.shaped('botanypotstiers:creative_terracotta_hopper_botany_pot', [
      '   ',
      ' A ',
      'BCB'
    ], {
      A:'projectexpansion:final_star_shard',
      B:'2x avaritia:infinity',
      C:'botanypotstiers:ultra_terracotta_hopper_botany_pot',
    }) 
    
    event.shapeless('avaritia:infinity_ingot', [
      Item.of('avaritia:infinity_nugget', 9)
    ])

    event.shaped('extendedcrafting:basic_table',[
        'ABA',
        'CDC',
        'AEA'
    ], {
      A:'extendedcrafting:basic_component',
      B:'extendedcrafting:basic_catalyst',
      C:'avaritia:double_compressed_crafting_table',
      D:'minecraft:iron_block',
      E:'extendedcrafting:black_iron_slate',
    })

    event.shapeless('mekanism:mekasuit_boots', [
      'kubejs:mekasuit_left_boot',
      'kubejs:mekasuit_right_boot'
    ])

    event.shaped('mekanism:mekasuit_helmet', [
      'ABA',
      'ACA',
      'DED'
    ], {
      A:'mekanism:hdpe_sheet',
      B:'mekanism:ultimate_control_circuit',
      C:'projecte:gem_helmet',
      D:'mekanism:pellet_polonium',
      E:'mekanism:basic_induction_cell',
    })

    event.shaped('mekanism:mekasuit_bodyarmor', [
      'ABA',
      'ACA',
      'DED'
    ], {
      A:'mekanism:hdpe_sheet',
      B:'mekanism:ultimate_control_circuit',
      C:'projecte:gem_chestplate',
      D:'mekanism:pellet_polonium',
      E:'mekanism:basic_induction_cell',
    })

    event.shaped('mekanism:mekasuit_pants', [
      'ABA',
      'ACA',
      'DED'
    ], {
      A:'mekanism:hdpe_sheet',
      B:'mekanism:ultimate_control_circuit',
      C:'projecte:gem_leggings',
      D:'mekanism:pellet_polonium',
      E:'mekanism:basic_induction_cell',
    })

    event.shaped('mekanism:mekasuit_boots', [
      'ABA',
      'ACA',
      'DED'
    ], {
      A:'mekanism:hdpe_sheet',
      B:'mekanism:ultimate_control_circuit',
      C:'projecte:gem_boots',
      D:'mekanism:pellet_polonium',
      E:'mekanism:basic_induction_cell',
    })

    event.shaped('projecte:dark_matter',[
      'AAA',
      'ABA',
      'AAA'
    ],{
      A: 'mysticalagradditions:imperium_coal',
      B: 'minecraft:diamond_block'
    })

    event.shaped('projecte:watch_of_flowing_time', [
      'ABA',
      'CDC',
      'AEA'
    ], {
      A:'projecte:dark_matter_block',
      B:'projectexpansion:matter_upgrader',
      C:'mekanism_extras:alloy_spectrum',
      D:'tiab:time_in_a_bottle',
      E:'pipez:infinity_upgrade',
    })

    event.shaped('pipez:infinity_upgrade',[
      'ABA',
      'BCB',
      'ABA'
    ], {
      A:'projecte:aeternalis_fuel',
      B:'pipez:ultimate_upgrade',
      C:'mysticalagradditions:creative_essence'
    })

    event.shaped('tiab:time_in_a_bottle', [
      'ABA',
      'CDC',
      'ACA'
    ], {
      A:'allthecompressed:emerald_block_2x',
      B:'botania:phantom_ink',
      C:'botania:elementium_ingot',
      D:'projecte:philosophers_stone'
    })

    event.shaped('mysticalagriculture:master_infusion_crystal', [
      'ABA',
      'BCB',
      'ABA'
    ], {
      A:'mysticalagradditions:insanium_essence',
      B:'mysticalagriculture:prosperity_shard',
      C:'mysticalagriculture:infusion_crystal'
    })

    event.custom({
        type: 'minecraft:smelting',
        ingredient: { item: 'minecraft:soul_sand' },
        result: 'mysticalagriculture:soulstone_cobble',
        experience: 0,
        cookingtime: 200
      }).id('kubejs:smelt_soulstone_cobble')

    event.recipes.thermal.centrifuge([
        Item.of('kubejs:mekasuit_right_boot', 1),
        Item.of('kubejs:mekasuit_left_boot', 1)
      ], 'mekanism:mekasuit_boots')

    event.custom({

        "type": "extendedcrafting:shaped_table",
        "pattern": [
          "  AABAA  ",
          " AABBBBA ",
          "ABABBBAAA",
          "ABBBBBBBA",
          "BBBBCBBBB",
          "ABBBBBBBA",
          "AAABBBABA",
          " ABBBBAA ",
          "  AABAA  "
        ],
        "key": {
          "A": {
            "item": "minecraft:end_stone"
          },
          "B": {
            "item": "minecraft:ender_pearl"
          },
          "C": {
            "item": "avaritia:neutron"
          }
        },
        "result": {
          "item": "avaritia:endest_pearl"
        }
      })

    event.custom({
      
        "type": "extendedcrafting:shaped_table",
        "pattern": [
          "         ",
          " ABCDEBA ",
          " BCDFGEB ",
          " CDFHFGE ",
          " GFHIHFG ",
          " EGFHFDC ",
          " BEGFDCB ",
          " ABEDCBA ",
          "         "
        ],
        "key": {
          "A": {
            "item": "avaritia:neutron_nugget"
          },
          "B": {
            "item": "minecraft:wheat"
          },
          "C": {
            "item": "minecraft:pumpkin"
          },
          "D": {
            "item": "minecraft:potato"
          },
          "E": {
            "item": "minecraft:melon"
          },
          "F": {
            "item": "minecraft:beetroot"
          },
          "G": {
            "item": "minecraft:carrot"
          },
          "H": {
            "item": "minecraft:nether_wart"
          },
          "I": {
            "item": "minecraft:cauldron"
          }
        },
        "result": {
          "item": 'avaritia:ultimate_stew'
        }
      })

    event.custom({
          "type": "extendedcrafting:shaped_table",
          "pattern": [
            "AAAAAAAAA",
            "AAAAAAAAA",
            "AAAAAAAAA",
            "AAAAAAAAA",
            "AAAAAAAAA",
            "AAAAAAAAA",
            "AAAAAAAAA",
            "AAAAAAAAA",
            "AAAAAAAAA"
          ],
          "key": {
            "A": {
              "item": "allthecompressed:coal_block_9x"
            }
          },
          "result": {
            "item": "minecraft:diamond"
          }
        })

    event.custom({
          "type": "extendedcrafting:shaped_table",
          "pattern": [
            "ABBCDCBBA",
            "BBCEEECBB",
            "BCFGHGFCB",
            "CEGGHGGEC",
            "DEHHIHHED",
            "CEGGHGGEC",
            "BCFGHGFCB",
            "BBCEEECBB",
            "ABBCDCBBA"
          ],
          "key": {
            "A": {
              "item": 'avaritia:infinity'
            },
            "B": {
              "item": "mysticalagradditions:creative_essence"
            },
            "C": {
              "item": "storagedrawers:creative_storage_upgrade"
            },
            "D": {
              "item": "megacells:item_storage_cell_256m"
            },
            "E": {
              "item": "extendedcrafting:the_ultimate_catalyst"
            },
            "F": {
              "item": "functionalstorage:gold_upgrade"
            },
            "G": {
              "item": "functionalstorage:diamond_upgrade"
            },
            "H": {
              "item": "functionalstorage:netherite_upgrade"
            },
            "I": {
              "item": "kubejs:omega_core"
            }
          },
          "result": {
            "item": 'functionalstorage:creative_vending_upgrade'
          }
        
        })
        
      event.custom({
            "type": "extendedcrafting:shaped_table",
            "pattern": [
              "ABA",
              "BCB",
              "ABA"
            ],
            "key": {
              "A": {
                "item": "minecraft:nether_star"
              },
              "B": {
                "item": "minecraft:chest"
              },
              "C": {
                "item": "minecraft:egg"
              }
            },
            "result": {
              "item": "artifacts:mimic_spawn_egg"
          }
        })

        event.custom({
            "type": "extendedcrafting:shaped_table",
            "pattern": [
              "         ",
              " ABBBBBA ",
              " CBDDDEE ",
              " CDDFDDE ",
              " CDFGFDE ",
              " CDDFDDE ",
              " CCDDDHE ",
              " AHHHHHA ",
              "         "
            ],
            "key": {
              "A": {
                "item": "avaritia:neutron_nugget"
              },
              "B": {
                "item": "minecraft:porkchop"
              },
              "C": {
                "item": "minecraft:chicken"
              },
              "D": {
                "item": "twilightforest:raw_venison"
              },
              "E": {
                "item": "minecraft:mutton"
              },
              "F": {
                "item": "twilightforest:raw_meef"
              },
              "G": {
                "type": "forge:nbt",
                "item": "minecraft:iron_sword",
                "count": 1,
                "nbt": "{Damage:0}"
              },
              "H": {
                "item": "minecraft:beef"
              }
            },
            "result": {
              "item": "avaritia:cosmic_meatballs"
          }
      })

      event.custom({
          "type": "extendedcrafting:shapeless_table",
          "ingredients": [
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_gemstone"
            },
            {
              "item": "mystical_extended_tier:ouranium_gemstone"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_gemstone"
            },
            {
              "item": "mystical_extended_tier:ouranium_gemstone"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_gemstone"
            },
            {
              "item": "extendedcrafting:the_ultimate_catalyst"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "extendedcrafting:the_ultimate_catalyst"
            },
            {
              "item": "mystical_extended_tier:ouranium_gemstone"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mysticalagriculture:master_infusion_crystal"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_gemstone"
            },
            {
              "item": "extendedcrafting:the_ultimate_catalyst"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "extendedcrafting:the_ultimate_catalyst"
            },
            {
              "item": "mystical_extended_tier:ouranium_gemstone"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_gemstone"
            },
            {
              "item": "mystical_extended_tier:ouranium_gemstone"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:tornium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_gemstone"
            },
            {
              "item": "mystical_extended_tier:ouranium_gemstone"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:ouranium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            },
            {
              "item": "mystical_extended_tier:lightium_essence"
            }
          ],
          "result": {
            "item": 'mysticalagradditions:creative_essence'
        }
    }) 

    event.custom({
      type: "draconicevolution:fusion_crafting",
              "result": {
              "item": "extendedcrafting:ultimate_singularity",
              "count": 2
            },
      catalyst: {
        item: "extendedcrafting:ultimate_singularity"
      },
      total_energy: 100000000, // en RF
      tier: "CHAOTIC", // ← ICI on définit le tier requis
      ingredients: [
          { item: 'mystical_extended_tier:ornium_ingot_block'},
          { item: 'mystical_extended_tier:ouranium_block'},
          { item: 'mystical_extended_tier:tornium_gemstone_block'},
          { item: 'enderio:end_steel_block'},
          { item: 'projecte:red_matter_block'},
          { item: 'mystical_extended_tier:lightium_coal_block'},
          { item: 'minecraft:emerald_block'},
          { item: 'minecraft:lapis_block'},
          { item: 'minecraft:gold_block'},
          { item: 'minecraft:redstone_block'},
          { item: 'extendedcrafting:nether_star_block'},
          { item: 'extendedcrafting:flux_star_block'},
          { item: 'extendedcrafting:ender_star_block'},
          { item: 'minecraft:honey_block'},
          { item: 'minecraft:amethyst_block'},
          { item: 'minecraft:netherite_block'},
          { item: 'minecraft:diamond_block'},
          { item: 'minecraft:iron_block'},
          { item: 'botania:corporea_block'},
          { item: 'botania:dragonstone_block'},
          { item: 'botania:mana_diamond_block'},
          { item: 'botania:elementium_block'},
          { item: 'botania:terrasteel_block'},
          { item: 'botania:manasteel_block'}
      ]
    })

    event.custom({
      type: 'extendedcrafting:combination',
      powerCost: 100000000,
      input: {
          "item": 'extendedcrafting:the_ultimate_ingot'
      },
      ingredients: [
        { item: 'mystical_extended_tier:ornium_ingot_block'},
        { item: 'mystical_extended_tier:ouranium_block'},
        { item: 'mystical_extended_tier:tornium_gemstone_block'},
        { item: 'enderio:end_steel_block'},
        { item: 'projecte:red_matter_block'},
        { item: 'mystical_extended_tier:lightium_coal_block'},
        { item: 'minecraft:emerald_block'},
        { item: 'minecraft:lapis_block'},
        { item: 'minecraft:gold_block'},
        { item: 'minecraft:redstone_block'},
        { item: 'extendedcrafting:nether_star_block'},
        { item: 'extendedcrafting:flux_star_block'},
        { item: 'extendedcrafting:ender_star_block'},
        { item: 'minecraft:honey_block'},
        { item: 'minecraft:amethyst_block'},
        { item: 'minecraft:netherite_block'},
        { item: 'minecraft:diamond_block'},
        { item: 'minecraft:iron_block'},
        { item: 'botania:corporea_block'},
        { item: 'botania:dragonstone_block'},
        { item: 'botania:mana_diamond_block'},
        { item: 'botania:elementium_block'},
        { item: 'botania:terrasteel_block'},
        { item: 'botania:manasteel_block'}
    ],
      result: {
          "item":'extendedcrafting:the_ultimate_ingot',
          "count": 2
      }
  })

 event.custom({
  "type": "extendedcrafting:shapeless_table",
  "ingredients": [
    { "item": "extendedcrafting:redstone_ingot" },
    { "item": "extendedcrafting:enhanced_redstone_ingot" },
    { "item": "mysticalagriculture:supremium_ingot" },
    { "item": "mysticalagriculture:awakened_supremium_ingot" },
    { "item": "enderio:redstone_alloy_ingot" },
    { "item": "ad_astra:calorite_ingot" },
    { "item": "twilightforest:fiery_ingot" },
    { "item": "minecraft:copper_ingot" },
    { "item": "enderio:conductive_alloy_ingot" },
    { "item": "thermal:signalum_ingot" },
    { "item": "thermal:bronze_ingot" },
    { "item": "minecraft:gold_ingot" },
    { "item": "alltheores:brass_ingot" },
    { "item": "thermal:electrum_ingot" },
    { "item": "enderio:vibrant_alloy_ingot" },
    { "item": "mysticalagriculture:imperium_ingot" },
    { "item": "thermal:lumium_ingot" },
    { "item": "mysticalagriculture:inferium_ingot" },
    { "item": "mysticalagriculture:prudentium_ingot" },
    { "item": "mysticalagriculture:tertium_ingot" },
    { "item": "alltheores:osmium_ingot" },
    { "item": "immersiveengineering:ingot_uranium" },
    { "item": "mystical_extended_tier:ornium_ingot" },
    { "item": "botania:manasteel_ingot" },
    { "item": "extendedcrafting:ender_ingot" },
    { "item": "extendedcrafting:enhanced_ender_ingot" },
    { "item": "draconicevolution:draconium_ingot" },
    { "item": "draconicevolution:awakened_draconium_ingot" },
    { "item": "thermal:enderium_ingot" },
    { "item": "megacells:sky_steel_ingot" },
    { "item": "botania:elementium_ingot" },
    { "item": "industrialforegoing:pink_slime_ingot" },
    { "item": "mysticalagradditions:insanium_ingot" },
    { "item": "mystical_extended_tier:lightium_ingot" },
    { "item": "minecraft:iron_ingot" },
    { "item": "thermal:lead_ingot" },
    { "item": "thermal:silver_ingot" },
    { "item": "thermal:nickel_ingot" },
    { "item": "immersiveengineering:ingot_steel" },
    { "item": "enderio:dark_steel_ingot" },
    { "item": "extendedcrafting:black_iron_ingot" },
    { "item": "immersiveengineering:ingot_hop_graphite" },
    { "item": "enderio:soularium_ingot" },
    { "item": "twilightforest:knightmetal_ingot" },
    { "item": "avaritia:neutron_ingot" },
    { "item": "minecraft:netherite_ingot" },
    { "item": "botania:terrasteel_ingot" },
    { "item": "botania:gaia_ingot" },
    { "item": "extendedcrafting:crystaltine_ingot" },
    { "item": "avaritia:crystal_matrix_ingot" },
    { "item": "mysticalagriculture:prosperity_ingot" },
    { "item": "twilightforest:ironwood_ingot" },
    { "item": "pneumaticcraft:ingot_iron_compressed" },
    { "item": "enderio:end_steel_ingot" },
    { "item": "alltheores:platinum_ingot" },
    { "item": "alltheores:iridium_ingot" },
    { "item": "industrialforegoing:pink_slime_ingot" },
    { "item": "mystical_extended_tier:tornium_ingot" },
    { "item": "mystical_extended_tier:ouranium_ingot" }
  ],
  "result": {
    "item": "extendedcrafting:the_ultimate_ingot"
  }
})


    event.custom({
      type: 'powah:energizing',
      ingredients: [
        { item: 'thermal:gunpowder_block'},
        { item: 'minecraft:redstone_block'},
        { item: 'minecraft:glowstone',
          count: 2
        }
      ],
      energy: 1500000,
      result: {
        item: 'extendedcrafting:luminessence'
      }
    })

    event.custom({
      type: 'botania:terra_plate',
      ingredients: [
        { item: 'twilightforest:naga_trophy' },
        { item: 'twilightforest:quest_ram_trophy' },
        { item: 'twilightforest:ur_ghast_trophy' },
        { item: 'twilightforest:lich_trophy' },
        { item: 'twilightforest:alpha_yeti_trophy' },
        { item: 'twilightforest:snow_queen_trophy' },
        { item: 'twilightforest:knight_phantom_trophy' },
        { item: 'twilightforest:hydra_trophy' },
        { item: 'twilightforest:minoshroom_trophy' },
        { item: 'supplementaries:enderman_head' },
        { item: 'minecraft:zombie_head' },
        { item: 'minecraft:skeleton_skull' },
        { item: 'minecraft:player_head' },
        { item: 'minecraft:wither_skeleton_skull' },
        { item: 'minecraft:creeper_head' },
        { item: 'minecraft:piglin_head' },
        { item: 'minecraft:dragon_head' }
      ],
      mana: 5000000,
      result: {
        item: 'kubejs:compressed_skull'
      }
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:basic_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:basic_relay', count: 6 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:basic_emc_link', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:basic_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:dark_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:dark_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:dark_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:basic_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:dark_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:red_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:red_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:red_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:dark_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:red_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:magenta_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:magenta_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:magenta_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:red_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:magenta_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:pink_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:pink_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:pink_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:magenta_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:pink_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:purple_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:purple_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:purple_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:pink_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:purple_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:violet_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:violet_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:violet_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:purple_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:violet_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:blue_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:blue_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:blue_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:violet_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:blue_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:cyan_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:cyan_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:cyan_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:blue_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:cyan_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:green_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:green_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:green_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:cyan_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:green_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:lime_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:lime_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:lime_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:green_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:lime_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:yellow_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:yellow_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:yellow_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:lime_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:yellow_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:orange_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:orange_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:orange_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:yellow_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:orange_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:white_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:white_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:white_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:orange_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:white_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:fading_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:fading_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:fading_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:white_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:fading_power_flower' }
      ]
    })

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:final_compressed_collector', count: 2 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:final_relay', count: 5 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:final_emc_link', count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: 'projectexpansion:fading_power_flower', count: 1 }
      ],
      pressure: 3.0,
      results: [
        { item: 'projectexpansion:final_power_flower' }
      ]
    })

    event.custom({
      type: 'extendedcrafting:shaped_table',
      pattern: [
        'AAA',
        'ABA',
        'AAA'
      ],
      key: {
        A: {
          item: 'projectexpansion:gargantuan_star_omega'
        },
        B: {
          item: 'extendedcrafting:nether_star_block'
        }
      },
      result: {
        item: 'projectexpansion:final_star_shard'
      }
    }).id('kubejs:custom_final_star_shard')

    event.custom({
      type: 'mekanism:oxidizing',
      input: {
        ingredient: {
          item: 'kubejs:antimatter_block'
        }
      },
      output: {
        gas: 'mekanism:antimatter',
        amount: 9000
      }
    })

    event.custom({
      type: "draconicevolution:fusion_crafting",
      result: {
        item: 'draconicadditions:chaos_heart'
      },
      catalyst: {
        item: 'draconicevolution:dragon_heart'
      },
      total_energy: 1000000,
      tier: "DRACONIC",
      ingredients: [
          { item: 'draconicevolution:medium_chaos_frag' },
          { item: 'draconicevolution:medium_chaos_frag' },
          { item: 'draconicevolution:medium_chaos_frag' },
          { item: 'draconicevolution:medium_chaos_frag' }
      ]
    })

    event.custom({
      type: "draconicevolution:fusion_crafting",
      result: {
        item: 'kubejs:chaos_block',
        count: 4
      },
      catalyst: {
        item: 'draconicadditions:chaos_heart'
      },
      total_energy: 750000000,
      tier: "CHAOTIC",
      ingredients: [
          { item: 'draconicevolution:chaotic_core' },
          { item: 'draconicevolution:chaotic_core' },
          { item: 'draconicevolution:chaotic_core' },
          { item: 'draconicevolution:chaotic_core' },
          { item: 'draconicevolution:chaotic_core' },
          { item: 'draconicevolution:chaotic_core' },
          { item: 'draconicevolution:awakened_draconium_block' },
          { item: 'draconicevolution:awakened_draconium_block' },
          { item: 'draconicevolution:awakened_draconium_block' },
          { item: 'draconicevolution:awakened_draconium_block' },
      ]
    })

    event.custom({
        "type": "extendedcrafting:shaped_table",
        "pattern": [
          "AABCDCBAA",
          "AEFBGBFEA",
          "BFHIIIHFB",
          "CBIJJJIBC",
          "DGIJKJIGD",
          "CBIJJJIBC",
          "BFHIIIHFB",
          "AEFBGBFEA",
          "AABCDCBAA"
        ],
        "key": {
          "A": {
            "item": "draconicevolution:reactor_core"
          },
          "B": {
            "item": "mystical_extended_tier:ouranium_essence"
          },
          "C": {
            "item": "avaritia:infinity"
          },
          "D": {
            "item": "kubejs:compressed_skull"
          },
          "E": {
            "item": "projectexpansion:compact_sun"
          },
          "F": {
            "item": "mekanism_extras:qio_drive_singularity"
          },
          "G": {
            "item": "allthecompressed:nitro_crystal_block_9x"
          },
          "H": {
            "item": "extendedcrafting:luminessence_block"
          },
          "I": {
            "item": "kubejs:chaos_block"
          },
          "J": {
            "item": "kubejs:antimatter_block"
          },
          "K": {
            "item": 'projectexpansion:final_star'
          }
        },
        "result": {
          "item": 'kubejs:omega_block'
        }
      })

      event.custom({
        type: "mysticalagriculture:infusion",
        input: { item: 'projectexpansion:final_star'},
        ingredients: [
          { item: 'avaritia:infinity_catalyst' },
          { item: 'mystical_extended_tier:tornium_essence' },
          { item: 'avaritia:infinity_catalyst' },
          { item: 'mystical_extended_tier:tornium_essence' },
          { item: 'avaritia:infinity_catalyst' },
          { item: 'mystical_extended_tier:tornium_essence' },
          { item: 'avaritia:infinity_catalyst' },
          { item: 'mystical_extended_tier:tornium_essence' },
          
          
        ],
        result: { item: 'mysticalagriculture:infinity_catalyst_seeds'},
        craftingTime: 100
      })

      event.custom({
        type: "mysticalagriculture:infusion",
        input: { item: 'projectexpansion:final_star'},
        ingredients: [
          { item: 'avaritia:infinity' },
          { item: 'mystical_extended_tier:tornium_essence' },
          { item: 'avaritia:infinity' },
          { item: 'mystical_extended_tier:tornium_essence' },
          { item: 'avaritia:infinity' },
          { item: 'mystical_extended_tier:tornium_essence' },
          { item: 'avaritia:infinity' },
          { item: 'mystical_extended_tier:tornium_essence' },
          
          
        ],
        result: { item: 'mysticalagriculture:infinity_seeds'},
        craftingTime: 100
      })

      event.recipes.botanypots.crop(
        'mysticalagriculture:infinity_catalyst_seeds',
        ['mystical_extended_tier:infinity_crux'], // nom de catégorie libre, que tu définis toi-même
        { block: 'mysticalagriculture:infinity_catalyst_crop' }, // bloc à afficher
        [
          Item.of('mysticalagriculture:infinity_catalyst_essence')
            .withChance(100)
            .withRolls(1, 2)
        ],
        4800 // 4 minutes
      )

      event.recipes.botanypots.soil(
        'mystical_extended_tier:infinity_crux', // the item that this soil is attached to
        { block: 'mystical_extended_tier:infinity_crux' }, // display block
        ['mystical_extended_tier:infinity_crux'], // categories that this soil provides
        100, // growth ticks that this soil will provide, set to -1 for no modifier
        0.5 // optional, growth modifier, example: 0.5 means all crops will take half the 
      )

            event.recipes.botanypots.crop(
        'mysticalagriculture:infinity_seeds',
        ['mystical_extended_tier:infinity_crux'], // nom de catégorie libre, que tu définis toi-même
        { block: 'mysticalagriculture:infinity_crop' }, // bloc à afficher
        [
          Item.of('mysticalagriculture:infinity_essence')
            .withChance(100)
            .withRolls(1, 2)
        ],
        4800 // 4 minutes
      )

      event.recipes.botanypots.soil(
        'mystical_extended_tier:infinity_crux', // the item that this soil is attached to
        { block: 'mystical_extended_tier:infinity_crux' }, // display block
        ['mystical_extended_tier:infinity_crux'], // categories that this soil provides
        100, // growth ticks that this soil will provide, set to -1 for no modifier
        0.5 // optional, growth modifier, example: 0.5 means all crops will take half the 
      )

      event.custom({
        type: 'extendedcrafting:combination',
        powerCost: 1000000,
        input: {
            item: 'extendedcrafting:ultimate_singularity'
        },
        ingredients: [
            { item: 'mysticalagriculture:infinity_catalyst_essence' },
            { item: 'mysticalagriculture:infinity_catalyst_essence' },
            { item: 'mysticalagriculture:infinity_catalyst_essence' },
            { item: 'mysticalagriculture:infinity_catalyst_essence' },
            { item: 'mysticalagriculture:infinity_catalyst_essence' },
            { item: 'mysticalagriculture:infinity_catalyst_essence' },
            { item: 'mysticalagriculture:infinity_catalyst_essence' },
            { item: 'mysticalagriculture:infinity_catalyst_essence' },

        ],
        result: {
            item:'avaritia:infinity_catalyst'
        }
    })
    event.custom({
        "type": "extendedcrafting:shaped_table",
        "pattern": [
          "AAAAAAAAA",
          "AB     BA",
          "A B   B A",
          "A  BCB  A",
          "A  CDC  A",
          "A  BCB  A",
          "A B   B A",
          "AB     BA",
          "AAAAAAAAA"
        ],
        "key": {
          "A": {
            "item": "avaritia:neutron_nugget"
          },
          "B": {
            "item": "avaritia:neutron_pile"
          },
          "C": {
            "item": "avaritia:neutron_gear"
          },
          "D": {
            "item": "solarflux:sp_de.chaotic"
          }
        },
        "result": {
          "item": "solarflux:sp_avaritia.neutronium",
          "count":2
        }
      }
    )
    event.custom({
        "type": "extendedcrafting:shaped_table",
        "pattern": [
          "A       A",
          " B  C  B ",
          "  BD DB  ",
          "  D   D  ",
          " C  E  C ",
          "  D   D  ",
          " B D DB  ",
          "B   C  B ",
          "A       A"
        ],
        "key": {
          "A": {
            "item": "avaritia:infinity_ingot"
          },
          "B": {
            "item": "avaritia:neutron_ingot"
          },
          "C": {
            "item": "solarflux:sp_avaritia.neutronium"
          },
          "D": {
            "item": "avaritia:infinity_nugget"
          },
          "E": {
            "item": "avaritia:infinity_catalyst"
          }
        },
        "result": {
          "item": 'solarflux:sp_avaritia.infinity'
        }
      }
    )

    event.custom({
      type: 'pneumaticcraft:pressure_chamber',
      inputs: [
        { type: 'pneumaticcraft:stacked_item', item: "mysticalagradditions:insanium_coal_block", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "draconicevolution:infused_obsidian" , count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "avaritia:record_fragment", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "avaritia:crystal_matrix", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "twilightforest:steeleaf_block", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "megacells:cell_component_4m", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "ironfurnaces:rainbow_coal", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "twilightforest:fiery_block", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "allthecompressed:redstone_block_5x", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "botania:corporea_spark_master", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "botania:dragonstone_block", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "kubejs:creative_block", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "avaritia:endest_pearl", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "avaritia:ultimate_stew", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "avaritia:cosmic_meatballs", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "ad_astra:calorite_block", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "mekanism_extras:infinite_control_circuit", count: 1 },
        { type: 'pneumaticcraft:stacked_item', item: "twilightforest:knightmetal_block", count: 1 }

      ],
      pressure: 5.0,
      results: [
        { item: 'avaritia:infinity_catalyst' }
      ]
    })

    event.custom({
      "type": "extendedcrafting:shaped_table",
        "pattern": [
            "AAAAAAAAA",
            "ABCBDBCBA",
            "ACEEDEECA",
            "ABEFFFEBA",
            "ADDFGFDDA",
            "ABEFFFEBA",
            "ACEEDEECA",
            "ABCBDBCBA",
            "AAAAAAAAA"
          ],
          "key": {
            "A": {
              "item": 'avaritia:infinity'
            },
            "B": {
              "item": "ae2:quartz_block"
            },
            "C": {
              "item": "mekanism_extras:infinite_control_circuit"
            },
            "D": {
              "item": "kubejs:creative_block"
            },
            "E": {
              "item": "kubejs:creative_ingot"
            },
            "F": {
              "item": "megacells:mega_energy_cell"
            },
            "G": {
              "item": "projectexpansion:final_star"
            }
          },
          "result": {
            "item": 'ae2:creative_energy_cell'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "         ",
    "         ",
    "ABCDEFCBA",
    "AGCHIHCGA",
    "AJCCCCCJA",
    "AKLLLLLKA",
    "MAAAAAAAM",
    "         ",
    "         "
  ],
  "key": {
    "A": {
      "item": "botania:shimmerrock"
    },
    "B": {
      "item": "botania:dice"
    },
    "C": {
      "item": "botania:fabulous_pool"
    },
    "D": {
      "item": "mythicbotany:kvasir_mead"
    },
    "E": {
      "item": "botania:rune_mana"
    },
    "F": {
      "item": "mythicbotany:mjoellnir"
    },
    "G": {
      "item": "extendedcrafting:ultimate_singularity"
    },
    "H": {
      "item": "megacells:mana_storage_cell_256m"
    },
    "I": {
      "item": "projectexpansion:final_star"
    },
    "J": {
      "item": "botania:terrasteel_block"
    },
    "K": {
      "item": "kubejs:creative_block"
    },
    "L": {
      "item": "kubejs:creative_ingot"
    },
    "M": {
      "item": "mekanism_extras:infinite_control_circuit"
    }
  },
  "result": {
    "item": 'botania:creative_pool'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "ABBBBBBBA",
    "BBCDDDCBB",
    "BCEFGFECB",
    "BDFHIHFDB",
    "BDGIJIGDB",
    "BDFHIHFDB",
    "BCEFGFECB",
    "BBCDDDCBB",
    "ABBBBBBBA"
  ],
  "key": {
    "A": {"item": "kubejs:creative_block"},
    "B": {"item": "kubejs:creative_ingot"},
    "C": {"item": "powah:battery_nitro"},
    "D": {"item": 'avaritia:infinity'},
    "E": {"item": "powah:ender_cell_nitro"},
    "F": {"item": "mekanism_extras:infinite_control_circuit"},
    "G": {"item": "extendedcrafting:ultimate_singularity"},
    "H": {"item": "extendedcrafting:the_ultimate_catalyst"},
    "I": {"item": "allthecompressed:nitro_crystal_block_6x"},
    "J":{"item": "projectexpansion:final_star"}
  },
  "result": {
    "item": 'powah:energy_cell_creative'
  }
})

event.custom({
  type: "extendedcrafting:shaped_table",
  pattern: [
    "ABBCDCBBA",
    "BBEFFFEBB",
    "BEFFGFFEB",
    "CFFHIHFFC",
    "DFJIKIJFD",
    "CFFHIHFFC",
    "BEFFGFFEB",
    "BBEFFFEBB",
    "ABBCDCBBA"
  ],
  key: {
    A: { item: "extendedcrafting:ultimate_singularity" },
    B: { item: 'avaritia:infinity' },
    C: { item: "mekanism:teleportation_core" },
    D: { item: "mekanism:pellet_antimatter" },
    E: { item: "mekanism_extras:infinite_control_circuit" },
    F: { item: "kubejs:creative_ingot" },
    G: { item: "mekanism_extras:infinite_induction_cell" },
    H: { item: "kubejs:creative_block" },
    I: { item: "mekanism_extras:infinite_energy_cube" },
    J: { item: "mekanism_extras:infinite_induction_provider" },
    K: { item: "projectexpansion:final_star" }
  },
  result: Item.of("mekanism:creative_energy_cube", {
    mekData: {
      componentConfig: {
        config0: {
          side0: 1,
          side1: 1,
          side2: 1,
          side3: 1,
          side4: 1,
          side5: 1
        }
      }
    }
  }).toJson()
})

event.custom({
  type: 'powah:energizing',
  ingredients: [
    { item: 'projectexpansion:final_star' },
    Item.of(
      'mekanism:creative_energy_cube',
      {
        mekData: {
          componentConfig: {
            config0: {
              side0: 1.0,
              side1: 1.0,
              side2: 1.0,
              side3: 1.0,
              side4: 1.0,
              side5: 1.0
            }
          }
        }
      }
    ).toJson()
  ],
  energy: 10000000000,
  result: Item.of(
    'mekanism:creative_energy_cube',
    {
      mekData: {
        EnergyContainers: [
          {
            Container: 0,
            stored: "18446744073709551615.9999"
          }
        ],
        componentConfig: {
          config0: {
            side0: 4,
            side1: 4,
            side2: 4,
            side3: 4,
            side4: 4,
            side5: 4
          }
        }
      }
    }
  ).toJson()
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "ABCDEDCBA",
    "BFCGGGCFB",
    "CCFCCCFCC",
    "DGCHHHCGD",
    "EGCHIHCGE",
    "DGCHHHCGD",
    "CCFCCCFCC",
    "BFCGGGCFB",
    "ABCDEDCBA"
  ],
  "key": {
    "A": {
      "item": "kubejs:creative_block"
    },
    "B": {
      "item": "mekanism_extras:infinite_control_circuit"
    },
    "C": {
      "item": "avaritia:infinity"
    },
    "D": {
      "item": "extendedcrafting:the_ultimate_catalyst"
    },
    "E": {
      "item": "extendedcrafting:ultimate_singularity"
    },
    "F": {
      "item": "kubejs:creative_ingot"
    },
    "G": {
      "item": "immersiveengineering:wirecoil_steel"
    },
    "H": {
      "item": "immersiveengineering:capacitor_hv"
    },
    "I": {
      "item": "projectexpansion:final_star"
    }
  },
  "result": {
    "item": 'immersiveengineering:capacitor_creative'
  }
})

  event.custom({
        type: "draconicevolution:fusion_crafting",
        result: {
          item: 'draconicevolution:creative_op_capacitor'
        },
        catalyst: {
          item: 'projectexpansion:final_star'
        },
        total_energy: 1000000000000, // en RF
        tier: "CHAOTIC", // ← ICI on définit le tier requis
        ingredients: [
            { item:'immersiveengineering:capacitor_creative' },
            { item:'draconicevolution:creative_capacitor' },
            { item:'powah:energy_cell_creative' },
            Item.of('mekanism:creative_energy_cube', '{mekData:{EnergyContainers:[{Container:0b,stored:"18446744073709551615.9999"}],componentConfig:{config0:{side0:4,side1:4,side2:4,side3:4,side4:4,side5:4}}}}'),
            { item:'extendedcrafting:ultimate_singularity' },
            { item:'extendedcrafting:ultimate_singularity' },
            { item:'extendedcrafting:ultimate_singularity' },
            { item:'extendedcrafting:ultimate_singularity' },
            { item:'kubejs:creative_block' },
            { item:'kubejs:creative_block' },
            { item:'kubejs:creative_block' },
            { item:'kubejs:creative_block' },
            { item:'kubejs:creative_ingot' },
            { item:'kubejs:creative_ingot' },
            { item:'kubejs:creative_ingot' },
            { item:'kubejs:creative_ingot' },
            { item:'kubejs:creative_ingot' },
            { item:'kubejs:creative_ingot' },
            { item:'kubejs:creative_ingot' },
            { item:'kubejs:creative_ingot' },
            { item:'mekanism_extras:infinite_control_circuit'},
            { item:'mekanism_extras:infinite_control_circuit'},
            { item:'mekanism_extras:infinite_control_circuit'},
            { item:'mekanism_extras:infinite_control_circuit'}
        ]
      })
      event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "ABCDEDCBA",
    "BFGGFGGFB",
    "CGFHFHFGC",
    "DGHFFFHGD",
    "EFFFIFFFE",
    "DGHFFFHGD",
    "CGFHFHFGC",
    "BFGGFGGFB",
    "ABCDEDCBA"
  ],
  "key": {
    "A": {
      "item": "extendedcrafting:ultimate_singularity"
    },
    "B": {
      "item": "extendedcrafting:the_ultimate_catalyst"
    },
    "C": {
      "item": "avaritia:infinity"
    },
    "D": {
      "item": "mekanism_extras:infinite_control_circuit"
    },
    "E": {
      "item": "kubejs:creative_block"
    },
    "F": {
      "item": "kubejs:creative_ingot"
    },
    "G": {
      "item": "draconicevolution:chaotic_core"
    },
    "H": {
      "item": "draconicevolution:chaotic_capacitor"
    },
    "I": {
      "item": "projectexpansion:final_star"
    }
  },
  "result": {
    "item": 'draconicevolution:creative_capacitor'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "ABCDEDCBA",
    "BCDFFFDCB",
    "CDGGHGGDC",
    "DFGHIHGFD",
    "EFHIJIHFE",
    "DFGHIHGFD",
    "CDGGHGGDC",
    "BCDFFFDCB",
    "ABCDEDCBA"
  ],
  "key": {
    "A": {
      "item": "extendedcrafting:ultimate_singularity"
    },
    "B": {
      "item": "kubejs:creative_block"
    },
    "C": {
      "item": "kubejs:creative_ingot"
    },
    "D": {
      "item": "mekanism_extras:infinite_control_circuit"
    },
    "E": {
      "item": "extendedcrafting:the_ultimate_catalyst"
    },
    "F": {
      "item": "mekanism_extras:supreme_chemical_tank"
    },
    "G": {
      "item": "mekanism:pellet_antimatter"
    },
    "H": {
      "item": "mekanism_extras:cosmic_chemical_tank"
    },
    "I": {
      "item": "mekanism_extras:infinite_chemical_tank"
    },
    "J": {
      "item": "projectexpansion:final_star"
    }
  },
  "result": {
    "item": 'mekanism:creative_chemical_tank'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "ABCDEDCBA",
    "BCDFFFDCB",
    "CDGGHGGDC",
    "DFGHIHGFD",
    "EFHIJIHFE",
    "DFGHIHGFD",
    "CDGGHGGDC",
    "BCDFFFDCB",
    "ABCDEDCBA"
  ],
  "key": {
    "A": {
      "item": "extendedcrafting:ultimate_singularity"
    },
    "B": {
      "item": "kubejs:creative_block"
    },
    "C": {
      "item": "kubejs:creative_ingot"
    },
    "D": {
      "item": "mekanism_extras:infinite_control_circuit"
    },
    "E": {
      "item": "extendedcrafting:the_ultimate_catalyst"
    },
    "F": {
      "item": "mekanism_extras:supreme_fluid_tank"
    },
    "G": {
      "item": "mekanism:pellet_antimatter"
    },
    "H": {
      "item": "mekanism_extras:cosmic_fluid_tank"
    },
    "I": {
      "item": "mekanism_extras:infinite_fluid_tank"
    },
    "J": {
      "item": "projectexpansion:final_star"
    }
  },
  "result": {
    "item": 'mekanism:creative_fluid_tank'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "ABBBBBBBA",
    "BCDEEEDCB",
    "BDFGHGFDB",
    "BEGIJIGEB",
    "BEHJKJHEB",
    "BEGIJIGEB",
    "BDFGHGFDB",
    "BCDEEEDCB",
    "ABBBBBBBA"
  ],
  "key": {
    "A": {
      "item": "kubejs:creative_block"
    },
    "B": {
      "item": "kubejs:creative_ingot"
    },
    "C": {
      "item": "pneumaticcraft:heat_sink"
    },
    "D": {
      "item": "pneumaticcraft:heat_pipe"
    },
    "E": {
      "item": "pneumaticcraft:compressed_iron_block"
    },
    "F": {
      "item": "mekanism:pellet_antimatter"
    },
    "G": {
      "item": "mekanism_extras:infinite_control_circuit"
    },
    "H": {
      "item": "extendedcrafting:the_ultimate_catalyst"
    },
    "I": {
      "item": "avaritia:infinity"
    },
    "J": {
      "item": "pneumaticcraft:vortex_tube"
    },
    "K": {
      "item": "projectexpansion:final_star"
    }
  },
  "result": {
    "item": 'pneumaticcraft:creative_compressed_iron_block'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "ABBBBBBBA",
    "BCDEEEDFB",
    "BDGHIHGDB",
    "BEHJKJHEB",
    "BEILMNIEB",
    "BEHJOJHEB",
    "BDGHIHGDB",
    "BFDEEEDCB",
    "ABBBBBBBA"
  ],
  "key": {
    "A": {
      "item": "kubejs:creative_block"
    },
    "B": {
      "item": "kubejs:creative_ingot"
    },
    "C": {
      "item": "pneumaticcraft:transistor"
    },
    "D": {
      "item": "pneumaticcraft:advanced_pressure_tube"
    },
    "E": {
      "item": "pneumaticcraft:plastic"
    },
    "F": {
      "item": "pneumaticcraft:capacitor"
    },
    "G": {
      "item": "mekanism:pellet_antimatter"
    },
    "H": {
      "item": "mekanism_extras:infinite_control_circuit"
    },
    "I": {
      "item": "extendedcrafting:the_ultimate_catalyst"
    },
    "J": {
      "item": "avaritia:infinity"
    },
    "K": {
      "item": "pneumaticcraft:advanced_liquid_compressor"
    },
    "L": {
      "item": "pneumaticcraft:advanced_air_compressor"
    },
    "M": {
      "item": "projectexpansion:final_star"
    },
    "N": {
      "item": "pneumaticcraft:flux_compressor"
    },
    "O": {
      "item": "pneumaticcraft:solar_compressor"
    }
  },
  "result": {
    "item": 'pneumaticcraft:creative_compressor'
  }
})

  event.custom({
    type: 'botania:runic_altar',
    output: {
      item: 'botanicalmachinery:mana_battery_creative'
    },
    mana: 500000,
    ingredients: [
      { item: 'botania:creative_pool' },
      { item: 'mekanism_extras:infinite_control_circuit' },
      { item: 'projectexpansion:final_star' },
      { item: 'mekanism:pellet_antimatter' },
      { item: 'extendedcrafting:ultimate_singularity' },
      { item: 'extendedcrafting:the_ultimate_catalyst' },
      { item: 'kubejs:creative_block' },
      { item: 'kubejs:creative_ingot' },
      { item: 'avaritia:infinity' },
    ]
  })

  event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "         ",
    "         ",
    "  ABCBD  ",
    "  BEFEB  ",
    "  CGHIC  ",
    "  BEJEB  ",
    "  KBCBL  ",
    "         ",
    "         "
  ],
  "key": {
    "A": {
      "item": "mekanism:upgrade_gas"
    },
    "B": {
      "item": "kubejs:creative_block"
    },
    "C": {
      "item": "avaritia:infinity"
    },
    "D": {
      "item": "mekanism:upgrade_anchor"
    },
    "E": {
      "item": "mekanism:pellet_antimatter"
    },
    "F": {
      "item": "mekanism:upgrade_speed"
    },
    "G": {
      "item": "mekanism:upgrade_energy"
    },
    "H": {
      "item": "projectexpansion:final_star"
    },
    "I": {
      "item": "mekanism:upgrade_muffling"
    },
    "J": {
      "item": "mekanism:upgrade_filter"
    },
    "K": {
      "item": "mekanism_extras:upgrade_stack"
    },
    "L": {
      "item": "mekanism_extras:upgrade_ionic_membrane"
    }
  },
  "result": {
    "item": 'mekanism_extras:upgrade_creative'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "AAAAAAAAA",
    "ABCCBCCBA",
    "ACBBCBBCA",
    "ABCCBCCBA",
    "AAAAAAAAA",
    "         ",
    "         ",
    "         ",
    "         "
  ],
  "key": {
    "A": {
      "item": "avaritia:neutron_ingot"
    },
    "B": {
      "item": "avaritia:crystal_matrix"
    },
    "C": {
      "item": "avaritia:infinity_catalyst"
    }
  },
  "result": {
    "item": 'avaritia:infinity_ingot'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    " AAAAAAA ",
    "AAAABAAAA",
    "AA  C  AA",
    "A   C   A",
    "    C    ",
    "    C    ",
    "    C    ",
    "    C    ",
    "    D    "
  ],
  "key": {
    "A": {
      "item": "avaritia:infinity_ingot"
    },
    "B": {
      "item": "projecte:rm_pick"
    },
    "C": {
      "item": "avaritia:neutron_ingot"
    },
    "D": {
      "item": "avaritia:crystal_matrix"
    }
  },
  "result": {
    "item": 'avaritia:infinity_pickaxe'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "   A     ",
    "  AAAAA  ",
    "  AABA   ",
    "  AAC    ",
    "   AC    ",
    "    C    ",
    "    C    ",
    "    C    ",
    "    D    "
  ],
  "key": {
    "A": {
      "item": "avaritia:infinity_ingot"
    },
    "B": {
      "item": "projecte:rm_axe"
    },
    "C": {
      "item": "avaritia:neutron_ingot"
    },
    "D": {
      "item": "avaritia:crystal_matrix"
    }
  },
  "result": {
    "item": 'avaritia:infinity_axe'
  }
})
event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "      AAA",
    "     AABA",
    "      CAA",
    "     D A ",
    "    D    ",
    "   D     ",
    "  D      ",
    " D       ",
    "E        "
  ],
  "key": {
    "A": {
      "item": "avaritia:infinity_ingot"
    },
    "B": {
      "item": "avaritia:infinity"
    },
    "C": {
      "item": "projecte:rm_shovel"
    },
    "D": {
      "item": "avaritia:neutron_ingot"
    },
    "E": {
      "item": "avaritia:crystal_matrix"
    }
  },
  "result": {
    "item": 'avaritia:infinity_shovel'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "AAAAABAAA",
    "ACCCCCCAA",
    "CCCCCCCCA",
    "CAAAACCAA",
    "AAAAADAAA",
    "AAAAAEAAA",
    "AAAAAFAAA",
    "AAAAAGAAA",
    "AAAAAHAAA"
  ],
  "key": {
    "A": {
      "item": "avaritia:infinity"
    },
    "B": {
      "item": "avaritia:neutron"
    },
    "C": {
      "item": "avaritia:infinity_ingot"
    },
    "D": {
      "item": "mystical_extended_tier:ouranium_hoe"
    },
    "E": {
      "item": "mysticalagriculture:awakened_supremium_hoe"
    },
    "F": {
      "type": "forge:nbt",
      "item": "aiotbotania:alfsteel_hoe",
      "count": 1,
      "nbt": "{Damage:0}"
    },
    "G": {
      "item": "draconicevolution:chaotic_hoe"
    },
    "H": {
      "item": "projecte:rm_hoe"
    }
  },
  "result": {
    "item": 'avaritia:infinity_hoe'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "       AA",
    "    B AAA",
    "   B AAA ",
    "    AAA  ",
    " C AAA   ",
    "  CAA  B ",
    "  DC  B  ",
    " E  C    ",
    "B        "
  ],
  "key": {
    "A": {
      "item": "avaritia:infinity_ingot"
    },
    "B": {
      "item": "avaritia:infinity_catalyst"
    },
    "C": {
      "item": "avaritia:crystal_matrix"
    },
    "D": {
      "item": "projecte:rm_sword"
    },
    "E": {
      "item": "avaritia:neutron"
    }
  },
  "result": {
    "item": 'avaritia:infinity_sword'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "   AA    ",
    "  A B    ",
    " A  B    ",
    "A   B    ",
    "C   B    ",
    "A   B    ",
    " A  B    ",
    "  A B    ",
    "   AA    "
  ],
  "key": {
    "A": {
      "item": "avaritia:infinity_ingot"
    },
    "B": {
      "item": "thermal:light_blue_rockwool"
    },
    "C": {
      "item": "avaritia:crystal_matrix"
    }
  },
  "result": {
    "item": 'avaritia:infinity_bow'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "  AAAAA  ",
    " ABBBBBA ",
    " A CBC A ",
    " ABBDBBA ",
    " ABBBBBA ",
    " AB B BA ",
    "         ",
    "         ",
    "         "
  ],
  "key": {
    "A": {
      "item": "avaritia:neutron_ingot"
    },
    "B": {
      "item": "avaritia:infinity_ingot"
    },
    "C": {
      "item": "avaritia:infinity_catalyst"
    },
    "D": {
      "type": "forge:nbt",
      "item": "mekanism:mekasuit_helmet",
      "count": 1,
      "nbt": "{mekData:{EnergyContainers:[{Container:0b,stored:\"16000000\"}]}}"
    }
  },
  "result": {
    "item": 'avaritia:infinity_helmet'
  }
})

event.custom(
  {
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    " A     A ",
    "AA AAA AA",
    "AAABBBAAA",
    " ABBBBBA ",
    " ABBCBBA ",
    " ABBBBBA ",
    " ABBBBBA ",
    " ABBBBBA ",
    "  AAAAA  "
  ],
  "key": {
    "A": {
      "item": "avaritia:neutron_ingot"
    },
    "B": {
      "item": "avaritia:infinity_ingot"
    },
    "C": {
      "type": "forge:nbt",
      "item": "mekanism:mekasuit_bodyarmor",
      "count": 1,
      "nbt": "{mekData:{EnergyContainers:[{Container:0b,stored:\"16000000\"}]}}"
    }
  },
  "result": {
    "item": 'avaritia:infinity_chestplate'
  }
})

event.custom(
  {
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "AAAAAAAAA",
    "ABBBCBBBA",
    "ABAAAAABA",
    "ADA   ADA",
    "ADA   ADA",
    "ABA   ABA",
    "ABA   ABA",
    "ABA   ABA",
    "ABA   ABA"
  ],
  "key": {
    "A": {
      "item": "avaritia:neutron_ingot"
    },
    "B": {
      "item": "avaritia:infinity_ingot"
    },
    "C": {
      "type": "forge:nbt",
      "item": "mekanism:mekasuit_pants",
      "count": 1,
      "nbt": "{mekData:{EnergyContainers:[{Container:0b,stored:\"16000000\"}]}}"
    },
    "D": {
      "item": "avaritia:infinity_catalyst"
    }
  },
  "result": {
    "item": 'avaritia:infinity_pants'
  }
})

event.custom(
  {
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "         ",
    "AABA ABAA",
    " ACA ACA ",
    " ACA ACA ",
    " ADA AEA ",
    "AACA ACAA",
    "ACCA ACCA",
    "AAAA AAAA",
    "         "
  ],
  "key": {
    "A": {
      "item": "avaritia:neutron_ingot"
    },
    "B": {
      "item": "avaritia:infinity_catalyst"
    },
    "C": {
      "item": "avaritia:infinity_ingot"
    },
    "D": {
      "item": "kubejs:mekasuit_right_boot"
    },
    "E": {
      "item": "kubejs:mekasuit_left_boot"
    }
  },
  "result": {
    "item": 'avaritia:infinity_boots'
  }
})

event.custom(
  {
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "AAAAAAAAA",
    "ABAAAAABA",
    "A  CCC  A",
    "B CDDDC B",
    "A CDEDC A",
    "B CDDDC B",
    "A  CCC  A",
    "A       A",
    "AAABABAAA"
  ],
  "key": {
    "A": {
      "item": "allthecompressed:iron_block_2x"
    },
    "B": {
      "item": "avaritia:crystal_matrix_ingot"
    },
    "C": {
      "item": "minecraft:redstone_block"
    },
    "D": {
      "item": "projectexpansion:magenta_matter"
    },
    "E": {
      "item": "avaritia:double_compressed_crafting_table"
    }
  },
  "result": {
    "item": 'avaritia:neutron_collector'
  }
})

event.custom(
  {
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "AAAAAAAAA",
    "ABAAAAABA",
    "A  CCC  A",
    "B CDDDC B",
    "A CDEDC A",
    "B CDDDC B",
    "A  CCC  A",
    "A       A",
    "AAABABAAA"
  ],
  "key": {
    "A": {
      "item": "allthecompressed:iron_block_2x"
    },
    "B": {
      "item": "avaritia:infinity_catalyst"
    },
    "C": {
      "item": "minecraft:redstone_block"
    },
    "D": {
      "item": "avaritia:neutron_collector"
    },
    "E": {
      "item": "avaritia:double_compressed_crafting_table"
    }
  },
  "result": {
    "item": 'avaritia:dense_neutron_collector'
  }
})

event.custom(
  {
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "AAAAAAAAA",
    "ABAAAAABA",
    "A  CCC  A",
    "B CDDDC B",
    "A CDEDC A",
    "B CDDDC B",
    "A  CCC  A",
    "A       A",
    "AAABABAAA"
  ],
  "key": {
    "A": {
      "item": "allthecompressed:iron_block_2x"
    },
    "B": {
      "item": "avaritia:infinity_ingot"
    },
    "C": {
      "item": "minecraft:redstone_block"
    },
    "D": {
      "item": "avaritia:dense_neutron_collector"
    },
    "E": {
      "item": "avaritia:double_compressed_crafting_table"
    }
  },
  "result": {
    "item": 'avaritia:denser_neutron_collector'
  }
})

event.custom(
  {
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "AAAAAAAAA",
    "ABAAAAABA",
    "A  CCC  A",
    "B CDDDC B",
    "A CDEDC A",
    "B CDDDC B",
    "A  CCC  A",
    "A       A",
    "AAABABAAA"
  ],
  "key": {
    "A": {
      "item": "allthecompressed:iron_block_2x"
    },
    "B": {
      "item": "avaritia:infinity"
    },
    "C": {
      "item": "minecraft:redstone_block"
    },
    "D": {
      "item": "avaritia:denser_neutron_collector"
    },
    "E": {
      "item": "avaritia:double_compressed_crafting_table"
    }
  },
  "result": {
    "item": 'avaritia:densest_neutron_collector'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "ABBCDCBBA",
    "BBCEFECBB",
    "BCGHIHGCB",
    "CEHIJIHEC",
    "DFIJKJIFD",
    "CEHIJIHEC",
    "BCGHIHGCB",
    "BBCEFECBB",
    "ABBCDCBBA"
  ],
  "key": {
    "A": {
      "item": "kubejs:creative_block"
    },
    "B": {
      "item": "kubejs:creative_ingot"
    },
    "C": {
      "item": "megacells:cell_component_256m"
    },
    "D": {
      "item": "avaritia:infinity"
    },
    "E": {
      "item": "extendedcrafting:ultimate_singularity"
    },
    "F": {
      "item": "extendedcrafting:the_ultimate_catalyst"
    },
    "G": {
      "item": "mekanism_extras:infinite_control_circuit"
    },
    "H": {
      "item": "mysticalagradditions:creative_essence"
    },
    "I": {
      "item": "ae2:drive"
    },
    "J": {
      "item": "ae2:item_cell_housing"
    },
    "K": {
      "item": "projectexpansion:final_star"
    }
  },
  "result": {
    "item": 'ae2:creative_item_cell'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "         ",
    "         ",
    "         ",
    "   ABA   ",
    "   CDC   ",
    "   AEA   ",
    "         ",
    "         ",
    "         "
  ],
  "key": {
    "A": {
      "item": "extendedcrafting:black_iron_ingot"
    },
    "B": {
      "item": "extendedcrafting:elite_catalyst"
    },
    "C": {
      "item": "extendedcrafting:elite_component"
    },
    "D": {
      "item": "extendedcrafting:frame"
    },
    "E": {
      "item": "extendedcrafting:black_iron_slate"
    }
  },
  "result": {
    "item": 'extendedcrafting:compressor'
  }
})

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    "         ",
    "         ",
    "         ",
    "   ABA   ",
    "   CDC   ",
    "   AEA   ",
    "         ",
    "         ",
    "         "
  ],
  "key": {
    "A": {
      "item": "extendedcrafting:black_iron_ingot"
    },
    "B": {
      "item": "extendedcrafting:ultimate_catalyst"
    },
    "C": {
      "item": "extendedcrafting:ultimate_component"
    },
    "D": {
      "item": "extendedcrafting:frame"
    },
    "E": {
      "item": "extendedcrafting:black_iron_slate"
    }
  },
  "result": {
    "item": 'extendedcrafting:crafting_core'
  }
})

event.smithing(
  'avaritia:upgrade_smithing_template',                    
  'minecraft:netherite_upgrade_smithing_template',
  'sophisticatedstorage:stack_upgrade_omega_tier',                  
  'extendedcrafting:the_ultimate_ingot'                          
)

event.custom({
  "type": "extendedcrafting:shaped_table",
  "pattern": [
    " A  A   A",
    "ABB C BB ",
    " BCCCCCB ",
    "  CCCCC A",
    "ACCCDCCC ",
    "  CCCCC  ",
    "ABCCCCCBA",
    " BB C BB ",
    " A    A A"
  ],
  "key": {
    "A": {
      "item": "cyclic:experience_food"
    },
    "B": {
      "item": "projectexpansion:green_matter"
    },
    "C": {
      "item": "avaritia:infinity_ingot"
    },
    "D": {
      "item": "avaritia:infinity_catalyst"
    }
  },
  "result": {
    "item": 'avaritia:enhancement_core'
  }
})
})


ServerEvents.tick(event => {
  const server = event.server;
  const level = server.getLevel('minecraft:overworld');
  if (!level) return;

  level.getEntities().forEach(entity => {
    if (!entity.item || entity.item.id !== 'extendedcrafting:the_ultimate_ingot') return;

    const pos = entity.blockPosition();
    const block = level.getBlock(pos);

    if (block.id === 'minecraft:lava') {
      entity.kill(); // supprime l'item

      // force le remplacement du bloc liquide par un autre
      level.runCommandSilent(`setblock ${pos.x} ${pos.y} ${pos.z} kubejs:ultimate`);

    }
  })

})
/*
EXEMPLE CRAFT CRAFTING CORE
    event.custom({
        type: 'extendedcrafting:combination',
        powerCost: 1000,
        input: {
            item: 'minecraft:red_wool'
        },
        ingredients: [
            { item: 'allthecompressed:cobblestone_1x' },
            { item: 'allthecompressed:cobblestone_1x' },
            { item: 'allthecompressed:cobblestone_1x' },
            { item: 'allthecompressed:cobblestone_1x' },
            { item: 'allthecompressed:oak_log_1x' },
            { item: 'allthecompressed:oak_log_1x' },
            { item: 'allthecompressed:oak_log_1x' },
            { item: 'allthecompressed:oak_log_1x' }
        ],
        result: {
            item:'projecte:philosophers_stone'
        }
    })
EXEMPLE CRAFT DRACONIC EVOLUTION
    event.custom({
        type: "draconicevolution:fusion_crafting",
        result: {
          item: "projecte:philosophers_stone"
        },
        catalyst: {
          item: "minecraft:red_wool"
        },
        total_energy: 1000000, // en RF
        tier: "DRACONIUM", // ← ICI on définit le tier requis
        ingredients: [
            { item: 'allthecompressed:cobblestone_1x' },
            { item: 'allthecompressed:cobblestone_1x' },
            { item: 'allthecompressed:cobblestone_1x' },
            { item: 'allthecompressed:cobblestone_1x' },
            { item: 'allthecompressed:oak_log_1x' },
            { item: 'allthecompressed:oak_log_1x' },
            { item: 'allthecompressed:oak_log_1x' },
            { item: 'allthecompressed:oak_log_1x' }
        ]
      })
EXEMPLE CRAFT MANA POOL

    event.custom({
        type: "botania:mana_infusion",
        input: {
          item: "minecraft:red_wool"
        },
        output: {
          item: "projecte:philosophers_stone"
        },
        mana: 50000, // quantité de mana nécessaire
    //catalyst: { type: "block", block: "botania:alchemy_catalyst" } // optionnel
      })

EXEMPLE CRAFT ULTIMATE 
    event.custom({
        type: 'extendedcrafting:shaped_table',
        "pattern": [
          "AAAAAAAAA",
          "AAAAAAAAA",
          "AABBBBBAA",
          "AABBBBBAA",
          "AABBCBBAA",
          "AABBBBBAA",
          "AABBBBBAA",
          "AAAAAAAAA",
          "AAAAAAAAA"
        ],
        "key": {
          "A": {
            "item": "allthecompressed:cobblestone_1x"
          },
          "B": {
            "item": "allthecompressed:oak_log_2x"
          },
          "C": {
            "item": "minecraft:red_wool"
          }
        },
        "result": {
          "item": 'projecte:philosophers_stone'
        }
      })

        event.shaped('powah:alternator_basic', [
    'IRI',
    'RER',
    'IRI'
  ], {
    I: 'minecraft:iron_ingot',
    R: 'minecraft:redstone',
    E: 'powah:energy_cell_basic' 
  }).id('kubejs:custom_flux_alternator_craft')

  EXEMPLE CRAFT MYSTICAL
        event.custom({
        type: "mysticalagriculture:infusion",
        input: { item: },
        ingredients: [
          { item:  },
          { item:  },
          { item:  },
          { item:  },
          { item:  },
          { item:  },
          { item:  },
          { item:  },
        ],
        result: { item: },
        craftingTime: 100
      })
*/
