Loot Table Modification (WIP)
onEvent('block.loot_tables', event => {
event.addSimpleBlock('minecraft:dirt', 'minecraft:red_sand')
})
event.addSimpleBlock('minecraft:dirt') // To drop itself (fix broken blocks)
event.addSimpleBlock(/minecraft:.*_ore/, 'minecraft:red_sand') // To drop a different item
event.build('minecraft:dirt', table => { // Build loot table manually
table.pool(pool => {
pool.rolls = 1 // Use one of these 3 - fixed, uniform, binominal
// pool.setUniformRolls(4, 6)
// pool.setBinomialRolls(4, 0.3)
pool.survivesExplosion()
pool.addItem('minecraft:dirt')
// pool.addCondition({json condition, see vanilla wiki})
// pool.addEntry({json entry, see vanilla wiki for non-items})
})
})