// priority: 0

// Visit the wiki for more info - https://kubejs.com/

console.info('Hello, World! (Loaded server scripts)')

ServerEvents.recipes(event => {
    // You can replace `event` with any name you like, as
    // long as you change it inside the callback too!
    event.shaped(
        Item.of('minecraft:elytra'), // arg 1: output
        [
          'ABA',
          'A A', // arg 2: the shape (array of strings)
          'A A'
        ],
        {
          A: 'minecraft:phantom_membrane',
          B: 'quark:dragon_scale'
        }
    ),

    event.shapeless(
        Item.of('minecraft:elytra', {Unbreakable:1}).strongNBT(),
        [
          'minecraft:elytra',
          'minecraft:nether_star',
          'minecraft:totem_of_undying',
          'minecraft:diamond_block'
        ],
    ),
    
    event.shapeless(
        Item.of('minecraft:netherite_helmet', {Unbreakable:1, Enchantments:[{id:"minecraft:protection",lvl:5},{id:"minecraft:respiration",lvl:3},{id:"minecraft:aqua_affinity",lvl:1}]}).strongNBT(),
          [
            'minecraft:netherite_helmet',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

    event.shapeless(
        Item.of('minecraft:netherite_chestplate', {Unbreakable:1, Enchantments:[{id:"minecraft:protection",lvl:5}]}).strongNBT(),
          [
            'minecraft:netherite_chestplate',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

    event.shapeless(
        Item.of('minecraft:netherite_leggings', {Unbreakable:1, Enchantments:[{id:"minecraft:protection",lvl:5},{id:"minecraft:swift_sneak",lvl:3}]}).strongNBT(),
          [
            'minecraft:netherite_leggings',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

    event.shapeless(
        Item.of('minecraft:netherite_boots', {Unbreakable:1, Enchantments:[{id:"minecraft:protection",lvl:5},{id:"minecraft:feather_falling",lvl:5},{id:"minecraft:depth_strider",lvl:3},{id:"minecraft:soul_speed",lvl:3},]}).strongNBT(),
          [
            'minecraft:netherite_boots',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

    event.shapeless(
      Item.of('minecraft:netherite_sword', {Unbreakable:1, Enchantments:[{id:"minecraft:sharpness",lvl:10},{id:"minecraft:looting",lvl:5}]}).strongNBT(),
          [
            'minecraft:netherite_sword',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

    event.shapeless(
        Item.of('minecraft:netherite_pickaxe', {Unbreakable:1, Enchantments:[{id:"minecraft:efficiency",lvl:8},{id:"minecraft:fortune",lvl:5}]}).strongNBT(),
          [
            'minecraft:netherite_pickaxe',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

    event.shapeless(
      Item.of('minecraft:netherite_pickaxe', {Unbreakable:1, Enchantments:[{id:"minecraft:efficiency",lvl:8},{id:"minecraft:silk_touch",lvl:1}]}).strongNBT(),
        [
          'minecraft:netherite_pickaxe',
          'minecraft:nether_star',
          'minecraft:totem_of_undying',
          'minecraft:diamond_block',
          'minecraft:string'
        ],
  ),

    event.shapeless(
      Item.of('minecraft:netherite_shovel', {Unbreakable:1, Enchantments:[{id:"minecraft:efficiency",lvl:8},{id:"minecraft:fortune",lvl:5}]}).strongNBT(),
          [
            'minecraft:netherite_shovel',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

    event.shapeless(
      Item.of('minecraft:netherite_shovel', {Unbreakable:1, Enchantments:[{id:"minecraft:efficiency",lvl:8},{id:"minecraft:silk_touch",lvl:1}]}).strongNBT(),
        [
          'minecraft:netherite_shovel',
          'minecraft:nether_star',
          'minecraft:totem_of_undying',
          'minecraft:diamond_block',
          'minecraft:string'
        ],
  ),

    event.shapeless(
      Item.of('minecraft:netherite_axe', {Unbreakable:1, Enchantments:[{id:"minecraft:efficiency",lvl:8},{id:"minecraft:fortune",lvl:5}]}).strongNBT(),
          [
            'minecraft:netherite_axe',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

    event.shapeless(
      Item.of('minecraft:netherite_axe', {Unbreakable:1, Enchantments:[{id:"minecraft:efficiency",lvl:8},{id:"minecraft:silk_touch",lvl:1}]}).strongNBT(),
        [
          'minecraft:netherite_axe',
          'minecraft:nether_star',
          'minecraft:totem_of_undying',
          'minecraft:diamond_block',
          'minecraft:string'
        ],
  ),

    event.shapeless(
        Item.of('minecraft:netherite_hoe', {Unbreakable:1, Enchantments:[{id:"minecraft:efficiency",lvl:8}]}).strongNBT(),
          [
            'minecraft:netherite_hoe',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

    event.shapeless(
        Item.of('minecraft:shears', {Unbreakable:1}).strongNBT(),
          [
            'minecraft:shears',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

    event.shapeless(
        Item.of('minecraft:fishing_rod', {Unbreakable:1, Enchantments:[{id:"minecraft:luck_of_the_sea",lvl:5},{id:"minecraft:lure",lvl:5}]}).strongNBT(),
          [
            'minecraft:fishing_rod',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

    event.shapeless(
        Item.of('minecraft:bow', {Unbreakable:1, Enchantments:[{id:"minecraft:power",lvl:10},{id:"minecraft:infinity",lvl:1}]}).strongNBT(),
          [
            'minecraft:bow',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

    event.shapeless(
        Item.of('minecraft:crossbow', {Unbreakable:1, Enchantments:[{id:"minecraft:quick_charge",lvl:3},{id:"minecraft:piercing",lvl:4},{id:"minecraft:multishot",lvl:1}]}).strongNBT(),
          [
            'minecraft:crossbow',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

    event.shapeless(
        Item.of('minecraft:trident', {Unbreakable:1}).strongNBT(),
          [
            'minecraft:trident',
            'minecraft:nether_star',
            'minecraft:totem_of_undying',
            'minecraft:diamond_block'
          ],
    ),

  event.shapeless(
      Item.of('minecraft:shield', {Unbreakable:1}).strongNBT(),
        [
          'minecraft:shield',
          'minecraft:nether_star',
          'minecraft:totem_of_undying',
          'minecraft:diamond_block'
        ],
  ),

  event.shapeless(
    Item.of('create_jetpack:netherite_jetpack', {Unbreakable:1, Enchantments:[{id:"minecraft:protection",lvl:5},{id:"create:capacity",lvl:10}]}).strongNBT(),
      [
        'create_jetpack:netherite_jetpack',
        'minecraft:nether_star',
        'minecraft:totem_of_undying',
        'minecraft:diamond_block'
      ],
  ),

  event.shapeless(
    Item.of('create:netherite_diving_helmet', {Unbreakable:1, Enchantments:[{id:"minecraft:protection",lvl:5},{id:"minecraft:respiration",lvl:3},{id:"minecraft:aqua_affinity",lvl:1}]}).strongNBT(),
      [
        'create:netherite_diving_helmet',
        'minecraft:nether_star',
        'minecraft:totem_of_undying',
        'minecraft:diamond_block'
      ],
  ),

  event.shapeless(
    Item.of('create:netherite_diving_boots', {Unbreakable:1, Enchantments:[{id:"minecraft:protection",lvl:5},{id:"minecraft:feather_falling",lvl:5},{id:"minecraft:depth_strider",lvl:3},{id:"minecraft:soul_speed",lvl:3},]}).strongNBT(),
      [
        'create:netherite_diving_boots',
        'minecraft:nether_star',
        'minecraft:totem_of_undying',
        'minecraft:diamond_block'
      ],
  ),
        
  event.recipes.create.mechanical_crafting('minecraft:nether_star', [
    '  C  ',
    ' CBC ',
    'CBABC',
    ' CBC ',
    '  C  '
  ], {
    A: 'minecraft:netherite_ingot',
    B: 'minecraft:diamond',
    C: 'minecraft:quartz_block'
  }),

      event.shaped(
        Item.of('minecraft:shulker_shell', 1),
        [
          'ACA',
          'A A',
          '   '
        ],
        {
          A: 'minecraft:chorus_fruit',
          C: 'minecraft:ender_pearl'
        }
      ),

      event.shaped(
        Item.of('minecraft:wither_skeleton_skull', 1),
        [
          'BBB',
          'BAB',
          'BBB'
        ],
        {
          A: 'minecraft:bone_block',
          B: 'minecraft:coal_block'
        }
      ),

      event.remove({ id: 'minecraft:netherite_ingot' }),

      event.shapeless(
        Item.of('minecraft:netherite_ingot', 1),
          [
            '2x minecraft:netherite_scrap',
            '4x minecraft:gold_ingot'
          ],
    ),

    event.shaped(
      Item.of('minecraft:enchanted_golden_apple', 1),
      [
        'BBB',
        'BAB',
        'BBB'
      ],
      {
        A: 'minecraft:apple',
        B: 'minecraft:gold_block'
      }
    ),

  event.shapeless(
    Item.of('minecraft:enchanted_golden_apple', 1),
      [
        '9x minecraft:golden_apple'
      ],
  ),

  event.shaped(
    Item.of('minecraft:totem_of_undying', 1),
    [
      ' B ',
      'BAB',
      ' B '
    ],
    {
      A: 'minecraft:enchanted_golden_apple',
      B: 'minecraft:emerald_block'
    }
  ),

  event.shapeless(
    Item.of('minecraft:dragon_egg', 1),
      [
        'minecraft:sniffer_egg',
        'quark:dragon_scale'
      ],
  ),

  event.recipes.create.compacting('create:creative_blaze_cake', ['4x create:blaze_cake', 'minecraft:nether_star', Fluid.lava(1000)]).superheated(),

  event.recipes.create.mechanical_crafting('create:creative_motor', [
    ' DDD ',
    'DCBCD',
    'DBABD',
    'DCBCD',
    ' DDD '
  ], {
    A: 'minecraft:nether_star',
    B: 'create:mechanical_arm',
    C: 'create:large_cogwheel',
    D: 'create:brass_ingot'
  }),

    console.log('Hello! The recipe event has fired!')
  })