#recipe that adds amount to nbt
8 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
consider this:
[Quote ➤](#archived-example-scripts message) A simple script to allow the change the recipe of upgrading backpacks in sophisticated backpacks.
event.remove({id:'sophisticatedbackpacks:gold_backpack'})
event.shapeless('sophisticatedbackpacks:gold_backpack',[
'sophisticatedbackpacks:iron_backpack',
'quark:ravager_hide'
]).modifyResult((inventory, itemstack) => {
item = inventory.find(Item.of('sophisticatedbackpacks:iron_backpack').ignoreNBT())
if (item.nbt == null) return itemstack
nbt = item.nbt
nbt.inventorySlots = 54
nbt.upgradeSlots = 4
return itemstack.withNBT(nbt)
})```
I'm not sure if you can change `inventorySlots` or `upgradeSlots` to what ever you want without issue. I've just set them to what they are meant to be in my pack.
But then again, I'm also not sure if you *can* do it without issue.
although from 1.18 it might be helpful for you
basically you just need to use .modifyResult
but notice that this only work with crafting table recipes
@gloomy light Unresolved thread still hasn't been closed! If your question was answered, please close this post with </ticket close:1054771505520717835> command!