The code is right there but basically I want to make it where it makes the diamond sword unbreakable and also with a name.

    "type": "minecraft:crafting_shaped",
    "pattern": [
        " # ",
        " # ",
        " / "
    "key": {
        "#": {
            "item": "minecraft:obsidian"
        "/": {
            "item": "minecraft:blaze_rod"
    "result": {
        "item": "minecraft:diamond_sword",
        "count": 1

As of the current Minecraft update (1.14.4) it is not possible to add custom NBT to crafting recipes, so you will be unable to give it a custom name and enchantments.

  • …which means you need to swap it out in the inventory later. How to do that is a bit complicated, I have a broad idea, but haven't programmed it in the game yet. But the basic way is /clear and /give, that just moves the item into a different slot. – Fabian Röling Jul 20 '19 at 9:47
  • Can I add damage modifiers at least? – Shiba Jul 24 '19 at 1:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.