#recipe that adds amount to nbt

8 messages · Page 1 of 1 (latest)

gloomy light
#

I am trying to make a filling recipe for Create Stuff and Additions fueling tank but I don’t know how to make a recipe that add a specific amount to the nbt of an an item.

cursive edgeBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

grave pier
#

consider this:

zealous kettleBOT
#

[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.
grave pier
#

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

cursive edgeBOT
#

@gloomy light Unresolved thread still hasn't been closed! If your question was answered, please close this post with </ticket close:1054771505520717835> command!