const chestReplacementMap = {
  "minecraft:torch": "hardcore_torches:lit_torch",
  "minecraft:lantern": "hardcore_torches:lit_lantern",
  "minecraft:soul_lantern": "hardcore_torches:lit_soul_lantern",
  "caverns_and_chasms:silver_ingot": "oreganized:silver_nugget",
  "caverns_and_chasms:silver_nugget": "oreganized:silver_nugget",
  "caverns_and_chasms:silver_block": "oreganized:silver_ingot",
  "caverns_and_chasms:tin_ingot": "create_ironworks:tin_nugget",
  "caverns_and_chasms:tin_nugget": "create_ironworks:tin_nugget",
  "caverns_and_chasms:tin_block": "create_ironworks:tin_ingot",
  "minecraft:gold_ingot": "minecraft:gold_nugget",
  "minecraft:diamond": "minecraft:copper_nugget",
  "minecraft:diamond_pickaxe": "minecraft:diamond",
  "minecraft:diamond_axe": "minecraft:diamond",
  "minecraft:diamond_sword": "minecraft:diamond",
  "minecraft:diamond_chestplate": "minecraft:diamond",
  "minecraft:diamond_leggings": "minecraft:diamond",
  "minecraft:diamond_boots": "minecraft:diamond",
  "minecraft:diamond_hoe": "minecraft:diamond"
}


LootJS.modifiers(event => {
    event
        .addLootTypeModifier([LootType.CHEST, LootType.UNKNOWN])
        .anyDimension(["minecraft:overworld"])
        .modifyLoot(Ingredient.of(Object.keys(chestReplacementMap)), (/** @type {Internal.ItemStack} */ item) =>
        Item.of(chestReplacementMap[item.item.id], item.count)
    )
})