The 1.16 update introduced the ability to use molang statements in the data parameter of recipe input and outputs. However, the molang is only calculated upon entering the world as opposed to when the recipe is crafted.
In terms of vanilla parity, this doesnt make much sense. Chest loot tables are calculated when opened (as of 1.16.20 due to requests from community + marketplace partners), but not recipes when crafted. This issue is severely limiting for add-on creativity for a variety of reasons.
1) recipe input/output cannot be dynamically randomized/altered.
2) global queries such as query.time_stamp cannot be accurately referenced, will always return the same number in any given world session.
Attached is a sample pack to craft a dye output with a data value from 0-4 (ingredient is 1 diamond). Notice that the type of dye crafted will always be the same unless you leave and rejoin the world.
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response
Is this still an issue in the latest version? If so, please make sure the ticket description contains the following information:
If your ticket does not look like the example given here, then it's likely to be closed as incomplete.
This ticket will automatically reopen when you reply.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki