add kubejs scripts
This commit is contained in:
parent
9767a38035
commit
74d4b0dccd
4 changed files with 104 additions and 1 deletions
|
@ -40,6 +40,14 @@ hash = "b3972803ddb0a76e13d5bd03c7468237dbf2928949a1fb2923a0c20f77a18b7a"
|
|||
file = "config/yosbr/options.txt"
|
||||
hash = "35437b4437d2a9292a0f05a7567a4c74da8b414a28cb7e53bdcae7f71d34f3b9"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/blacklist.js"
|
||||
hash = "19d0d5abc449c46aa42f10682eccaaf20df7444b29d14b6ee3675313df98c603"
|
||||
|
||||
[[files]]
|
||||
file = "kubejs/server_scripts/loot-table.js"
|
||||
hash = "552e7612afeab1ec64668559982ca7d35ef917e38915b4849d8e5b24fb333546"
|
||||
|
||||
[[files]]
|
||||
file = "mods/adorn.pw.toml"
|
||||
hash = "0904d6eaf57c3a13708c22af5eccaac980cbaa38097d1ebfff6429be207b367a"
|
||||
|
|
50
.minecraft/kubejs/server_scripts/blacklist.js
Normal file
50
.minecraft/kubejs/server_scripts/blacklist.js
Normal file
|
@ -0,0 +1,50 @@
|
|||
const itemBlacklist = [
|
||||
"allium_peripherals:chat_modem_creative"
|
||||
]
|
||||
|
||||
// remove recipes
|
||||
onEvent('recipes', event => {
|
||||
itemBlacklist.forEach(item => {
|
||||
event.remove({output: item})
|
||||
})
|
||||
});
|
||||
|
||||
// handle items
|
||||
onEvent('item.pickup', event => {
|
||||
if (itemBlacklist.includes(event.item.id)) {
|
||||
event.cancel();
|
||||
};
|
||||
|
||||
});
|
||||
onEvent('item.toss', event => {
|
||||
if (itemBlacklist.includes(event.item.id)) {
|
||||
event.cancel();
|
||||
};
|
||||
});
|
||||
onEvent('item.right_click', event => {
|
||||
if (itemBlacklist.includes(event.item.id)) {
|
||||
event.cancel();
|
||||
};
|
||||
});
|
||||
|
||||
// handle blocks
|
||||
onEvent('block.place', event => {
|
||||
if (itemBlacklist.includes(event.block.id)) {
|
||||
event.cancel();
|
||||
};
|
||||
});
|
||||
onEvent('block.break', event => {
|
||||
if (itemBlacklist.includes(event.block.id)) {
|
||||
event.cancel();
|
||||
};
|
||||
});
|
||||
onEvent('block.right_click', event => {
|
||||
if (itemBlacklist.includes(event.block.id)) {
|
||||
event.cancel();
|
||||
};
|
||||
});
|
||||
onEvent('block.left_click', event => {
|
||||
if (itemBlacklist.includes(event.block.id)) {
|
||||
event.cancel();
|
||||
};
|
||||
});
|
45
.minecraft/kubejs/server_scripts/loot-table.js
Normal file
45
.minecraft/kubejs/server_scripts/loot-table.js
Normal file
|
@ -0,0 +1,45 @@
|
|||
|
||||
// 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
|
||||
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)
|
||||
|
||||
// add tuff to loot table
|
||||
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)
|
||||
})
|
||||
})
|
||||
})
|
|
@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0"
|
|||
[index]
|
||||
file = "index.toml"
|
||||
hash-format = "sha256"
|
||||
hash = "f0fd74432519c07d2c5c6d3fe1dc3f210bdb1d4150f175324eb78b4e9138c4eb"
|
||||
hash = "878c8a6d9edd4862637af5e2e1e1ebaa7fab125dd34750a81021b8efa71d892c"
|
||||
|
||||
[versions]
|
||||
fabric = "0.14.19"
|
||||
|
|
Loading…
Reference in a new issue