I have a small question: does Minecraft 1.14.4 allow NBT tags in crafting recipes? Because I'm making a map in 1.14.3 and some part of the map need custom NBT tags crafting and I need to use custom crafting chest to make it
Here's a very good workaround I shamelessly copied from Michael P.'s answer here (side notes mine):
- Set the recipe's "result" to a particular item that a player is not likely to ever have in their inventory (e.g. Spawn Eggs, Bedrock, Command Blocks).
- Create an advancement that a player achieves either by crafting your custom recipe or by acquiring the intermediate item into their inventory.
- Set the reward of the advancement to trigger a custom function.
- Have the custom function remove the intermediate item from the player's inventory and add the actual result with the NBT data.
Side note: Consider revoking the advancement in the function, so that the result replacement can happen multiple times. Unless custom advancements can be granted multiple times, for which I see no indication on the wiki.
Another side note: Didn't test it yet, but this probably doesn't work well with stack-crafting, i.e. you fill in the materials multiple times and then shift-click out the result. Most likely, doing that will only yield one item and have the rest of the materials go to waste. (I'm lucky in that regard, because the recipes I have in mind involve unstackable items.)
UPDATE: I tried it out with a mod item (one of the trophies from Dimensional Dungeons), and it works, but it's a bit wonky. In Creative Mode, it gives you the NBT item immediately, but doesn't clear the intermediate item. In Survival Mode, the intermediate item is cleared and the NBT item is given, but only next time you click a Crafting Table (other container-ish blocks might work as well). Tested under MineCraft 1.15.2, Forge 31.2.37; things might look different in other versions.