const chestReplacementMap = {
  "minecraft:torch": "hardcore_torches:lit_torch",
  "minecraft:lantern": "hardcore_torches:lit_lantern",
  "minecraft:soul_lantern": "hardcore_torches:lit_soul_lantern",
  "minecraft:gold_ingot": "minecraft:gold_nugget",
  "minecraft:diamond": "minecraft:copper_nugget",
}


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)
    )
})