How would one go about saving the NBT from a tool and upgrade it to the next tier by adding ingots? There was a mod called "actually useful smithing tables" that did this behavior. I would also be happy to just use an ars nouveau enchantment device or vanilla crafting recipe. What I'd like happen, is apotheosis generates custom loot in chests, I'd like to be able to take a wooden pickaxe of blank and upgrade it to a stone pickaxe of blank. Any ideas would be appreciated, thanks
#Upgrade tools using smithing table and ingot
10 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
I'd basically like to know the method for stripping the NBT from one item, deleting it, and giving the upgraded tool back (or armor). Basically I'd like a shapeless recipe that would take a stone X and upgrade it to iron X by just putting both the item and an ingot into a recipe. The more generic the better, because I'd prefer not to have to create a recipe for every item in the game that has stone through diamond/netherite variants
I could probably replicate this using the example code on https://wiki.latvian.dev/books/kubejs-legacy/page/recipeeventjs and moving it onto a book by reversing steps... but that example code crashes on 1.20
Examples
The most basic script to add a single recipe:
onEvent('recipes', event => {
event.shap...
I'm going to try it with event.custom({ { "type": "ars_nouveau:enchanting_apparatus", "keepNbtOfReagent": true, "output": { "item": "minecraft:iron_pickaxe" }, "pedestalItems": [ { "item": "minecraft:iron_ingot" } ], "reagent": [ { "item": "minecraft:stone_pickaxe" } ], "sourceCost": 0 } }) } as an example of upgrading stone to iron and see if it keeps the nbt
there's got to be a more automated way to do this with loops and arrays though, so if anyone has ideas on how to automate it for a list of materials and tools/armors, that'd be awesome
... well you can use the smithing table to do this... but 1.20 uses the netherite smithing template as an input...
lmao
alright, so current smithing works, just need to do smithing like event.smithing( // 'minecraft:air', // template? 'minecraft:golden_pickaxe', // arg 1: output 'minecraft:iron_pickaxe', // arg 2: the item to be upgraded 'minecraft:gold_ingot', // arg 3: the upgrade item 'minecraft:cobblestone' ) or thereabouts to get a working upgrade that doesn't lose nbt
so I'll mark this as closed for now, as I found my solution on my own