// priority: 0
// Visit the wiki for more info - https://kubejs.com/
// console.info('Hello, World! (Loaded startup scripts)')

//Add worldedit items (This replaces the default minecraft axe and compass)
StartupEvents.registry("item", (event) => {
  // The texture for this item has to be placed in kubejs/assets/kubejs/textures/item/test_item.png
  event
    .create("worldedit_wand")
    .displayName("WorldEdit Wand")
    .maxStackSize(1);
  event
    .create("worldedit_nav")
    .displayName("WorldEdit Navigation Tool")
    .maxStackSize(1);
});


//Add custom items
StartupEvents.registry("item", (event) => {
  // The texture for this item has to be placed in kubejs/assets/kubejs/textures/item/test_item.png
  event
    .create("brass_piston")
    .displayName("Brass Piston")
    .maxStackSize(64);
  event
    .create("brass_gear")
    .displayName("Brass Gear")
    .maxStackSize(64);
  event
    .create("wanderlite_dust")
    .displayName("Wanderlite Dust")
    .maxStackSize(64);
  event
    .create("wanderlite_ingot")
    .displayName("Wanderlite Ingot")
    .maxStackSize(64);
  /**
   * 
   * 
   * Cataclysm items
   */
  //Witherite (Harbinger)
  event
    .create("witherite_powder")
    .displayName("Witherite Dust")
    .maxStackSize(64);
  event
    .create("black_netherite_ingot")
    .displayName("Black Netherite Ingot")
    .maxStackSize(64);

  //Abyssal (Leviathan)
  event
    .create("abyssal_dust")
    .displayName("Abyssal Dust")
    .maxStackSize(64);
  event
    .create("abyssal_ingot")
    .displayName("Abyssal Ingot")
    .maxStackSize(64);
  event
    .create("abyssal_pearl")
    .displayName("Abyssal Pearl")
    .maxStackSize(64);

  //Cursium (Necromancer)
  event
    .create("cursium_dust")
    .displayName("Cursium Dust")
    .maxStackSize(64);
  event
    .create("cursium_pearl")
    .displayName("Cursium Pearl")
    .maxStackSize(64);

  //Monstrous (Nether golem)
  event
    .create("monstrous_dust")
    .displayName("Monstrous Dust")
    .maxStackSize(64);
  event
    .create("monstrous_pearl")
    .displayName("Monstrous Pearl")
    .maxStackSize(64);
  event
    .create("monstrous_ingot")
    .displayName("Monstrous Ingot")
    .maxStackSize(64);

  //Ancient Remnant
  event
    .create("ancient_dust")
    .displayName("Ancient Dust")
    .maxStackSize(64);
  // event
  //   .create("ancient_ingot")
  //   .displayName("Ancient Ingot")
  //   .maxStackSize(64);
  event
    .create("ancient_pearl")
    .displayName("Ancient Pearl")
    .maxStackSize(64);


  //End Guardian
  event
    .create("void_core_dust")
    .displayName("Void Core Dust")
    .maxStackSize(64);
  event
    .create("void_ingot")
    .displayName("Void Ingot")
    .maxStackSize(64);
  event
    .create("void_pearl")
    .displayName("Void Pearl")
    .maxStackSize(64);

  //Ignus
  event
    .create("ignitium_powder")
    .displayName("Ignitium Dust")
    .maxStackSize(64);
  event
    .create("ignitium_ingot")
    .displayName("Crystalized Ignitium Ingot")
    .maxStackSize(64);
  event
    .create("ignitium_pearl")
    .displayName("Ignitium Pearl")
    .maxStackSize(64);

  /**
   * Create items
   */
  event
    .create("precision_component")
    .displayName("Precision Component")
    .maxStackSize(64);
  event
    .create("precision_machine")
    .displayName("Precision Machine")
    .maxStackSize(64);
  event
    .create("warp_core")
    .displayName("Warp Core")
    .maxStackSize(16);
  event
    .create("super_xp_housing")
    .displayName("Hyper XP Core")
    .maxStackSize(16);
});

//Add custom blocks
StartupEvents.registry("block", (event) => {
  event
    .create("phantom_dirt") // Create a new block
    .soundType("grass")
    .displayName("Phantom Dirt") // Set a custom name
    .textureAll("kubejs:block/dirt")
    .hardness(0.9) // Set hardness (affects mining time)
    .tagBlock("minecraft:mineable/shovel") // mined faster with a shovel
    .tagBlock("minecraft:needs_iron_tool") // the tool tier must be at least iron
    .fullBlock(true)
    .suffocating(true)
    .noCollision();

  event
    .create("phantom_cobblestone") // Create a new block
    .soundType("stone")
    .displayName("Phantom Cobblestone") // Set a custom name
    .textureAll("kubejs:block/cobblestone")
    .hardness(0.9) // Set hardness (affects mining time)
    .tagBlock("minecraft:mineable/pickaxe") // mined faster with a shovel
    .tagBlock("minecraft:needs_iron_tool") // the tool tier must be at least iron
    .fullBlock(true)
    .suffocating(true)
    .noCollision();

  event
    .create("phantom_stone") // Create a new block
    .soundType("stone")
    .displayName("Phantom Stone") // Set a custom name
    .textureAll("kubejs:block/stone")
    .hardness(0.9) // Set hardness (affects mining time)
    .tagBlock("minecraft:mineable/pickaxe") // mined faster with a shovel
    .tagBlock("minecraft:needs_iron_tool") // the tool tier must be at least iron
    .fullBlock(true)
    .suffocating(true)
    .noCollision();

  event
    .create("phantom_netherrack") // Create a new block
    .soundType("stone")
    .displayName("Phantom Netherrack") // Set a custom name
    .textureAll("kubejs:block/netherrack")
    .hardness(0.9) // Set hardness (affects mining time)
    .tagBlock("minecraft:mineable/pickaxe") // mined faster with a shovel
    .tagBlock("minecraft:needs_iron_tool") // the tool tier must be at least iron
    .fullBlock(true)
    .suffocating(true)
    .noCollision();

  event
    .create("phantom_end_stone") // Create a new block
    .soundType("stone")
    .displayName("Phantom End Stone") // Set a custom name
    .textureAll("kubejs:block/end_stone")
    .hardness(0.9) // Set hardness (affects mining time)
    .tagBlock("minecraft:mineable/pickaxe") // mined faster with a shovel
    .tagBlock("minecraft:needs_iron_tool") // the tool tier must be at least iron
    .fullBlock(true)
    .suffocating(true)
    .noCollision();

  event
    .create("phantom_stone_bricks") // Create a new block
    .soundType("stone")
    .displayName("Phantom Stone Bricks") // Set a custom name
    .textureAll("kubejs:block/stone_bricks")
    .hardness(0.9) // Set hardness (affects mining time)
    .tagBlock("minecraft:mineable/pickaxe") // mined faster with a shovel
    .tagBlock("minecraft:needs_iron_tool") // the tool tier must be at least iron
    .fullBlock(true)
    .suffocating(true)
    .noCollision();

  event
    .create("phantom_sandstone") // Create a new block
    .soundType("stone")
    .displayName("Phantom Sandstone") // Set a custom name
    .textureAll("kubejs:block/sandstone_top")
    .hardness(0.9) // Set hardness (affects mining time)
    .tagBlock("minecraft:mineable/pickaxe") // mined faster with a shovel
    .tagBlock("minecraft:needs_iron_tool") // the tool tier must be at least iron
    .fullBlock(true)
    .suffocating(true)
    .noCollision();

  event
    .create("phantom_red_sandstone") // Create a new block
    .soundType("stone")
    .displayName("Phantom Red Sandstone") // Set a custom name
    .textureAll("kubejs:block/red_sandstone_top")
    .hardness(0.9) // Set hardness (affects mining time)
    .tagBlock("minecraft:mineable/pickaxe") // mined faster with a shovel
    .tagBlock("minecraft:needs_iron_tool") // the tool tier must be at least iron
    .fullBlock(true)
    .suffocating(true)
    .noCollision();

  event
    .create("phantom_snow") // Create a new block
    .soundType("stone")
    .displayName("Phantom Snow") // Set a custom name
    .textureAll("kubejs:block/snow")
    .hardness(0.9) // Set hardness (affects mining time)
    .tagBlock("minecraft:mineable/shovel") // mined faster with a shovel
    .tagBlock("minecraft:needs_iron_tool") // the tool tier must be at least iron
    .fullBlock(true)
    .suffocating(true)
    .noCollision();
});
