Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use NBT crafting? #1

Closed
ReZLone opened this issue Feb 27, 2024 · 1 comment
Closed

How to use NBT crafting? #1

ReZLone opened this issue Feb 27, 2024 · 1 comment

Comments

@ReZLone
Copy link

ReZLone commented Feb 27, 2024

So a feature I really hoped would have helped me is NBT crafting recipes. The idea of finally being able to create proper custom crafting recipes that show the result with the correct NBT data was incredible. Only problem I don't know how to put the nbt data into the recipe json.

@Micalobia
Copy link
Owner

Micalobia commented Feb 29, 2024

I need to work on better documentation, so I'll pin this issue until I get that sorted out.

So in the result, there's an additional tag element, so it'd end up looking something like this

{
    "type": "crafting_shapeless",
    "ingredients": [
        {
            "item": "minecraft:diamond_sword"
        }
    ],
    "result": {
        "item": "minecraft:diamond_sword",
        "count": 1,
        "tag": {
            "display": {
                "Name":"\"Shiny Diamond Sword\"",
                "Lore": ["{\"text\":\"It's Shiny!\",\"color\":\"gold\"}"]
            },
            "Enchantments": [{}]
        }
    }
}

The same thing can be used on the result of a shaped recipe, as well as smithing recipes although I haven't tested that one thoroughly.

@Micalobia Micalobia pinned this issue Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants