#how do i add custom nbt when using custom recipes

14 messages · Page 1 of 1 (latest)

swift cypress
#

i'm trying to add a different name for the output of the recipe

abstract kelpBOT
#

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

swift cypress
#
    event.custom({
        type: 'create:filling',
        ingredients: [
            {
                item: "minecraft:glass_bottle"
            },
            {
                type: "fluid_stack",
                amount: 250,
                fluid: "kubejs:lightning_blood"
            }
        ],
        results: [
            {
                item: "iceandfire:lightning_dragon_blood"
            }
        ]
    })

this is my current code i want the result to have a different name

#

yes i know create addon exists but there's not a fabric 1.20.1 version of it out

little fossil
#

./kubejs hand

swift cypress
# little fossil ./kubejs hand

when i try doing
item: Item.of('iceandfire:lightning_dragon_blood', "{display:{Name:'{\"text\":\"§dElectric Dragon Blood\"}'}}")

#

it gives me an error saying it expected item to be a string, was an object

little fossil
#

ye it might not work for your case give me a sec

#
        {
            item: "iceandfire:lightning_dragon_blood",
            nbt:{
                "display":{
                    "Name": '{"text":"Lightning Dragon Poop","italic":false}'
                }
            }
        }
    ]
#

check if that works first

swift cypress
#
    event.custom({
        type: 'create:filling',
        ingredients: [
            {
                item: "minecraft:glass_bottle"
            },
            {
                type: "fluid_stack",
                amount: 250,
                fluid: "kubejs:lightning_blood"
            }
        ],
        results: [
            {
                item: 'iceandfire:lightning_dragon_blood', 
                nbt: {
                    "display": {
                        "Name": '{"text":"§dElectric Dragon Blood"}'
                    }
                }
            }
        ]
    })
#

this is the final code

little fossil
#

great