Skip to content

Commit

Permalink
Implement ATM Armor Salvage Recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyPandas committed May 30, 2022
1 parent 0ccf46b commit 0d86b34
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions kubejs/server_scripts/mod_specific/silentsgear/silentsgear.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
onEvent('recipes', e => {
// Output is an array of result objects.
// example: [{item: "minecraft:leather", count: 8}]
let salvage = (e, input, output) => {
e.custom({
type: "silentgear:salvaging",
ingredient: {
item: input
},
results: output
})
}

const nuggetRatio = {"helmet": 2, "chestplate": 4, "leggings": 3, "boots": 2}

utils.listOf(['allthemodium', 'vibranium', 'unobtanium'])
.forEach(type => {
utils.listOf(['helmet', 'chestplate', 'leggings', 'boots'])
.forEach(armor => {
salvage(e, `allthemodium:${type}_${armor}`, [{item: `allthemodium:${type}_nugget`, count: nuggetRatio[armor]}])
})
})
})

0 comments on commit 0d86b34

Please sign in to comment.