The Bug:
Basically the title, writing an invalid reference in the tick/load function tag of a data pack prevents functions from the tick/load tag of all other data packs from running. Edit : The issue seems to depend on the order the data packs are loaded, if they are loaded before or after the broken data pack.
Context:
This is annoying and confusing for the players; people often download several data packs in a row, and complain to other data pack authors that their own are broken or incompatible, whereas it is just a single bad data pack that blocks them. Removing or disabling the data pack that has missing references just makes all other data packs work correctly again.
Steps to Reproduce (and Observed Behaviors):
Download the attached FonctionalDataPack and BrokenDataPack data packs.
Create a new world, and add only the FonctionalDataPack during creation. -> A message "FonctionalDataPack has been loaded correctly!" will be shown from the load function. A "pling" sound will play and a soul_fire particle will be shown in front of the player each tick from a tick function.
Add the BrokenDataPack to the world and use the /reload command. -> The commands of the load and tick functions of the FonctionalDataPack won't run anymore.
If you want, try to disable the BrokenDataPack with the /datapack disable "file/BrokenDataPack" command. -> The commands of the load and tick functions of the FonctionalDataPack will run correctly again.
Expected Behavior:
The game should just warn and skip the missing references, letting the other data packs functions-tags (or valid references in this same functions-tag) run, so it won't compromise the functioning of other data packs.
Attachments
Comments 6
Yeah... this is intentional tag behavior; missing required entry -> can't load.
As @unknown pointed out, the "optional" field for entries exists for this exact purpose, allowing tags to load if a value is absent.
More consistent with what? In other instances, an invalid file reference means the file doesn't load (eg missing parent for advancement, invalid item for recipe, non-existing dimension type for dimensions).
For comparibility with other data packs, simply do not set replace to true. Tag values append unless you set replace to true. If your pack is missing their own references, that's that data pack's problem, not the ones it breaks.
In either case, that's a change request, and not a bug.
Thank you for your report!
However, this issue is Invalid.
You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit Minecraft Suggestions on Reddit or visit the Feedback website.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Just as this thread as been re-opened and marked as important, I can confirm the issue still happens for all versions since the one I created this issue, so 1.19.3 to 1.21.4 and recent snapshots. Unfortunately, I still get reports from my users who don't understand why my data packs don't work for them. I have to explain them this issue and show the error "missing tick reference" from their logs coming from other datapacks they use.
Use
"required":false
if you are not confident your tag entries exist