// 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("black_netherite_ingot")
    .displayName("Black Netherite Ingot")
    .maxStackSize(64);
  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();
});
