60 lines
No EOL
1.4 KiB
JavaScript
60 lines
No EOL
1.4 KiB
JavaScript
|
|
// Custom Loot Tables
|
|
onEvent('block.loot_tables', 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
|
|
// default, 0.02, 2%
|
|
const stoneLootChance = 0.02
|
|
const stoneLootTable = [
|
|
"minecraft:redstone",
|
|
"minecraft:raw_iron",
|
|
"minecraft:raw_gold",
|
|
"minecraft:lapis_lazuli",
|
|
]
|
|
event.addBlock('minecraft:stone', table => {
|
|
table.addPool(pool => {
|
|
pool.addItem('minecraft:cobblestone', 1)
|
|
|
|
for (i = 0; i < stoneLootTable.length; i++) {
|
|
pool.addItem(stoneLootTable[i],1).randomChance(stoneLootChance)
|
|
}
|
|
})
|
|
})
|
|
|
|
const deepSlateLootChance = 0.02
|
|
const deepSlateLootTable = [
|
|
"minecraft:tuff",
|
|
]
|
|
event.addBlock('minecraft:deepslate', table => {
|
|
table.addPool(pool => {
|
|
pool.addItem('minecraft:cobbled_deepslate', 1)
|
|
|
|
for (i = 0; i < deepSlateLootTable.length; i++) {
|
|
pool.addItem(deepSlateLootTable[i],1).randomChance(deepSlateLootChance)
|
|
}
|
|
})
|
|
})
|
|
})
|
|
|
|
|
|
onEvent('recipes', event => {
|
|
|
|
// Allium Entangled Modem
|
|
event.shaped('1x allium_peripherals:entangled_modem', [
|
|
'O O',
|
|
'ECE',
|
|
'MPM'
|
|
], {
|
|
O: 'minecraft:obsidian',
|
|
E: 'computercraft:wireless_modem_advanced',
|
|
C: 'minecraft:ender_chest',
|
|
M: 'computercraft:wired_modem',
|
|
P: 'minecraft:ender_eye'
|
|
})
|
|
}) |