The most recent snapshot (17w48a) added the ability for datapacks to include custom recipes.
Recipes with NBT tags (for example, a named or enchanted item) should work. In-game crafting, however, ignores the nbt tag and crafts as if it were not specified.
As a test, I tried two ways of doing the NBT tags for the resulting item, which should be (as an example) a diamond chestplate with Protection I.
1: As its own string, i.e.
"result": {
"item": "minecraft:diamond_chestplate",
"nbt": "{ench:[{id:0,lvl:1}]}",
"count": 1
}
This results in a diamond chestplate which is not enchanted, seen below in the screenshot with the emerald. No errors are returned in the output log here.
2: With the item string (as the newer syntax for item nbt), i.e.
"result": {
"item": "minecraft:diamond_chestplate{ench:[{id:0,lvl:1}]}",
"count": 1
}
This crafting recipe has no result at all, seen below in the screenshot with the nether star.
The output log returns the result:
java.lang.IllegalArgumentException: Non [a-z0-9/._-] character in path of location: minecraft:diamond_chestplate{ench:[{id:0,lvl:1}]}
referring to the NBT tag itself.
In case it helps, I've also attached a zipped version of the datapack I'm using.
Linked issues
is duplicated by 4
Attachments
Comments 4
Sad to see that it's marked as Invalid. Will make the custom recipes feature somewhat useless, since recipes can't be chained together.
The format is not complete yet, lack of feature != bug.