Context:
- I want to replace all iron and diamond armor inside recipes with botania and livingarmor equivalent. I thought i was being smart by making 2 arrays and do a double forEach loop, but this failed (the console.log works, but the recipes arent actually being changed)
- using just the event.replaceInput(from, to) doesnt work either
code:
const replaceInputArr = [
['minecraft:iron_helmet', 'botania:manasteel_helmet'],
['minecraft:iron_chestplate', 'botania:manasteel_chestplate'],
['minecraft:iron_leggings', 'botania:manasteel_leggings'],
['minecraft:iron_boots', 'botania:manasteel_boots'],
['minecraft:diamond_helmet', 'bloodmagic:livinghelmet'],
['minecraft:diamond_chestplate', 'bloodmagic:livingplate'],
['minecraft:diamond_leggings', 'bloodmagic:livingleggings'],
['minecraft:diamond_boots', 'bloodmagic:livingboots']
]
const modsToChange = [
'ars_nouveau',
'bloodmagic',
'rootsclassic',
'malum'
]
modsToChange.forEach(mod =>{
replaceInputArr.forEach(recipe =>{
let input = recipe[0]
let output = recipe[1]
console.log(`replacing ${input} with ${output} in mod: ${mod}`)
event.replaceInput({mod: mod}, input, output)
})
})
event.replaceInput('minecraft:iron_helmet', 'botania:manasteel_helmet')