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