onEvent("lootjs", (event) => {
  let drop = (ore, drop) => {
    event
    .addBlockLootModifier(ore)
    .thenReplace(ore, drop)
  }
  drop("#forge:ores/tin", "kubejs:tin_ore_chunk")
  drop("#forge:ores/iron", "exnihilosequentia:chunk_iron")
  drop("#forge:ores/gold", "exnihilosequentia:chunk_gold")
  drop("#forge:ores/zinc", "exnihilosequentia:chunk_zinc")
  drop("#forge:ores/uranium", "exnihilosequentia:chunk_uranium")
  drop("#forge:ores/aluminum", "exnihilosequentia:chunk_aluminum")
  drop("#forge:ores/silver", "exnihilosequentia:chunk_silver")
  drop("#forge:ores/nickel", "exnihilosequentia:chunk_nickel")
  drop("#forge:ores/lead", "exnihilosequentia:chunk_lead")
  drop("#forge:ores/copper", "exnihilosequentia:chunk_copper")
  drop("#forge:ores/platinum", "exnihilosequentia:chunk_platinum")
})

onEvent("lootjs", (event) => {
  let hammer = (material) => {
    event
    .addBlockLootModifier("minecraft:stone")
    .matchMainHand(Item.of(material).ignoreNBT())
    .thenReplace("minecraft:cobblestone", "minecraft:air");
  }
  hammer('exnihilosequentia:hammer_wood')
  hammer('exnihilosequentia:hammer_stone')
  hammer('exnihilosequentia:hammer_iron')
  hammer('exnihilosequentia:hammer_gold')
  hammer('exnihilosequentia:hammer_diamond')
  hammer('exnihilosequentia:hammer_netherite')
})