2008Choco / Alchema

Spigot plugin. In-world cauldron crafting, witchcraft and sorcery
https://www.spigotmc.org/resources/alchema.87078/
GNU General Public License v3.0
9 stars 3 forks source link

Custom Potion Support #14

Closed iBELLinc closed 2 years ago

iBELLinc commented 2 years ago

As far as I can tell the json recipe file cannot handle custom nbt data for the "item" tag. (Please correct me if I am wrong) My idea would be to include an "nbt" or "itemmeta" tag which allows for creation of items (such as potions) with custom nbt data. Specifically I would like to use "custompotioneffects" and "custompotioncolor" as listed here. Though, I believe that adding custom nbt support for all items could allow other users to create some interesting recipes such as custom soups with higher/lower saturation based on the ingredients used (something else I am very interested in doing).

Alternatively, I have been attempting to add this data using this format. Perhaps it would be better than a special nbt tag: "item": { "id": "minecraft:potion", "custompotioneffects": { "id": 1, "amplifier": 2, "duration": 1200 }, "custompotioncolor": "#00bfff" }

Preferably I would like the option to add more than one potion effect so that these cauldron-brewed potions are weaker and also have a negative effect; hinting that the cheaper Alchema recipes are convenient but not as stable as brewing stand potions. Possible multi-effect implementation (unless this is already possible with one tag):

"item": { "id": "minecraft:potion", "custompotioneffects": { "id": 1, "amplifier": 2, "duration": 1200 }, "custompotioneffects": { "id": 2, "amplifier": 0, "duration": 1200 } "custompotioncolor": "#00bfff" }

2008Choco commented 2 years ago

This has technically been resolved by 72c77bc and will be available in a future version. alchema:item ingredients and result items will now support NBT

{
    "result": {
        "item": "minecraft:diamond_sword{Enchantments:[{id:\"minecraft:sharpness\",lvl:5}],display:{Name:\"Hello world!\"}}"
    },
    "ingredients": [
        {
            "type": "alchema:material",
            "item": "minecraft:diamond",
            "amount": 2
        },
        {
            "type": "alchema:material",
            "item": "minecraft:stick"
        }
    ]
}