WarzoneMC / tgm-docs

TGM Documentation
https://docs.warz.one
3 stars 6 forks source link

Document crafting module #19

Open jorgeberrex opened 5 years ago

jorgeberrex commented 5 years ago

All ingredients can be defined either as a string (example: "bookshelf") or a JSON object for matching exact items (example: {"material": "bookshelf", "displayName": "Magical books"} )

Removing recipes

Recipe removal for a specific material

    "crafting": {
        "remove": [
            "crafting table"
        ]
    },

NOTE: compass recipe is always removed

Remove all recipes

    "crafting": {
        "remove": "*"
    },

Adding custom recipes:

shapeless recipes

    "crafting": {
        "recipes": [
            {
                "type": "shapeless",
                "result": {
                    "material": "iron sword",
                    "displayName": "&6&lExodus"
                },
                "ingredients": [
                    "dirt"
                ]
            }
        ]
    },

shaped recipes

    "crafting": {
        "recipes": [
            {
                "type": "shaped",
                "result": {
                    "material": "diamond",
                    "enchantments": ["power:1"]
                },
                "ingredients": {
                    "X": "dirt",
                    "Y": "stone"
                },
                "shape": [
                    "XY",
                    "YX"
                ]
            }
        ]
    },

Cooking recipes (furnace, smoking, blasting, campfire)

    "crafting": {
        "recipes": [
            {
                "type": "campfire",
                "result": {
                    "material": "diamond",
                    "lore": [
                        "Yes this is how diamonds are made"
                    ]
                },
                "ingredient": "coal",
                "experience": 0,
                "cookingTime": 600
            }
        ]
    },

NOTE: experience and cookingTime are optional.

Stonecutting recipes

    "crafting": {
        "recipes": [
            {
                "type": "stonecutting",
                "result": {
                    "material": "smooth stone slab"
                },
                "ingredient": "stone"
            }
        ]
    },