let metal_ores_drop = (id, dust_id) => ({
    "type": "minecraft:block",
    "pools": [
        {
            "rolls": 1,
            "entries": [
                {
                    "type": "minecraft:alternatives",
                    "children": [
                        {
                            "type": "minecraft:item",
                            "conditions": [
                                {
                                    "condition": "minecraft:match_tool",
                                    "predicate": {
                                        "enchantments": [
                                            {
                                                "enchantment": "minecraft:silk_touch",
                                                "levels": {
                                                    "min": 1
                                                }
                                            }
                                        ]
                                    }
                                }
                            ],
                            "name": id
                        },
                        {
                            "type": "minecraft:item",
                            "name": dust_id,
                            "functions": [
                                {
                                    "function": "minecraft:explosion_decay"
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "rolls": 1,
            "entries": [
                {
                    "type": "minecraft:item",
                    "conditions": [
                        {
                            "condition": "minecraft:table_bonus",
                            "enchantment": "minecraft:fortune",
                            "chances": [
                                0.0,
                                0.125,
                                0.25,
                                0.35,
                                0.5
                            ]
                        }
                    ],
                    "name": dust_id
                }
            ]
        }
    ]
})

ServerEvents.blockLootTables(event => {
    //event.addJson(TUR('titanium_ore'), metal_ores_drop(TUR('titanium_ore'), M_C('raw_titanium')))
})

LootJS.modifiers(event => {
	event.addEntityLootModifier(MC("wither_skeleton")).replaceLoot(MC("bone"), KJ("necrotic_bone"), true)
	
	//remove flint drop from gravel (manually)
    event.addBlockLootModifier(MC("gravel")).replaceLoot(MC("flint"), MC("gravel"))
});