1

I'm looking to make a datapack (or if impossible, bukkit/spigot/paper plugin, but I haven't got any experience with plugins) that makes it so smithing templates are not consumed upon crafting. I also want to disable the crafting recipes for duplicating armor trims.

For the first part, it seems to be impossible to prevent the smithing template from being consumed using datapacks. I'm currently looking for a way to give the player a new smithing template if it is applied instead, but I haven't managed to find a way.

For the second part, I've tried to add a custom crafting recipes with the same input as the smithing templates, but with no resulting item. This has only given me console errors so far, though.

Is there any way to program the two desired features using datapacks, or otherwise a bukkit/spigot/paper plugin?

1 Answer 1

2

You can do this with datapacks.

Using an advancement, you can detect when a player crafts an item using the new recipe_crafted condition added in 1.20. Here is an example...

{
    "criteria": {
        "requirement": {
            "trigger": "minecraft:recipe_crafted",
            "conditions": {
                "recipe_id": "minecraft:netherite_pickaxe_smithing"
            }
        }
    },
    "rewards": {
        "function": "mypack:do_something"
    }
}

In the function mypack:do_something, you can revoke the advancement and give the player the upgrade template like so...

advancement revoke @s only mypack:my_advancement
give @s netherite_upgrade_smithing_template 1

This is a little tedious, but it is probably the only way you can realistically achieve it using datapacks.

As for removing smithing template duplication, follow this tutorial.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .