43 lines
No EOL
1.7 KiB
JavaScript
43 lines
No EOL
1.7 KiB
JavaScript
|
|
// Custom Loot Tables
|
|
ServerEvents.blockLootTables(event => {
|
|
event.addBlock('minecraft:cobblestone', table => {
|
|
table.addPool(pool => {
|
|
pool.addItem('minecraft:coal', 1).randomChance(0.3)
|
|
pool.addItem('minecraft:cobblestone', 1)
|
|
})
|
|
})
|
|
|
|
// stone loot table
|
|
event.addBlock('minecraft:stone', table => {
|
|
table.addPool(pool => {
|
|
pool.addItem('minecraft:cobblestone', 1)
|
|
// add stone ores to loot table with a 0.005 chance
|
|
pool.addItem('minecraft:iron_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:gold_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:copper_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:diamond_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:emerald_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:lapis_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:redstone_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:coal_ore', 1).randomChance(0.005)
|
|
})
|
|
})
|
|
|
|
event.addBlock('minecraft:deepslate', table => {
|
|
table.addPool(pool => {
|
|
pool.addItem('minecraft:cobbled_deepslate', 1)
|
|
pool.addItem('minecraft:tuff', 1).randomChance(0.02)
|
|
|
|
// add deepslate ores to loot table with a 0.005 chance
|
|
pool.addItem('minecraft:deepslate_iron_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:deepslate_gold_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:deepslate_copper_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:deepslate_diamond_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:deepslate_emerald_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:deepslate_lapis_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:deepslate_redstone_ore', 1).randomChance(0.005)
|
|
pool.addItem('minecraft:deepslate_coal_ore', 1).randomChance(0.005)
|
|
})
|
|
})
|
|
}) |