#Is There Any Way To Add NBT To Json Recipes?

9 messages · Page 1 of 1 (latest)

remote lotus
#

I'm trying to add some mechanical crafter (create) recipes to the car parts from the automobility mod, but sadly they all have NBT data tied to them.

This is definitely possible because I'm trying to mimic what I saw done in one of Re:Create SMP's videos.

Anyway, here are some failed code experiments:

native badgeBOT
#

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

remote lotus
#
ServerEvents.recipes(event => {
    event.custom({
        
    "type": "create:mechanical_crafting",
    "accept_mirrored": false,
    "category": "misc",
    "key": {
        "A": {
        "item": "create:andesite_alloy"
        }
    },
    "pattern": [
        "AAA"
    ],
    "result": {
        "count": 1,
        "id": `automobility:automobile_frame`,
        "nbt": 'automobility:frame="automobility:wooden_motorcar"'
    },
    "show_notification": false
    
    })

Somehow works, but gives an none existent item with wonky properties

#
ServerEvents.recipes(event => {
    event.custom({
        
    "type": "create:mechanical_crafting",
    "accept_mirrored": false,
    "category": "misc",
    "key": {
        "A": {
        "item": "create:andesite_alloy"
        },
        "P": {
        "tag": "minecraft:planks"
        },
        "S": {
        "tag": "c:stones"
        }
    },
    "pattern": [
        " AAA ",
        "AAPAA",
        "APSPA",
        "AAPAA",
        " AAA "
    ],
    "result": {
        "count": 1,
        "id": Item.of(`automobility:automobile_frame[automobility:frame="automobility:wooden_motorcar"]`)
    },
    "show_notification": false
    
    })

Doesn't work

#
ServerEvents.recipes(event => {
    event.custom({
        
    "type": "create:mechanical_crafting",
    "accept_mirrored": false,
    "category": "misc",
    "key": {
        "A": {
        "item": "create:andesite_alloy"
        }
    },
    "pattern": [
        "AAA"
    ],
    "result": Item.of(`automobility:automobile_frame[automobility:frame="automobility:wooden_motorcar"]`),
    "show_notification": false
    
    })

Okay I stumbled my way to the answer - I'm stupid (this works)

hasty spindle
#

you need to check how create does it, its not controlled by kjs, but by the mod the recipe is from

twilit cove
remote lotus