mojira.dev
MC-311487

`recipes` in advancement triggers can be a inline recipe or list contains it, which never matches

This issue applies to following advancement triggers:

  • crafter_recipe_crafted

  • recipe_crafted

  • recipe_unlocked

The recipes field of these can accept a inline definition of recipe or a list contains them, even though they never matches because game always provides a id of recipe to these trigger.

This is because recipe is a Recipe.LIST_CODEC, which is RegistryCodecs.holderSet(Registries.RECIPE, DIRECT_CODEC). I assume it should use something like RegistryCodecs.holderSet(Registries.RECIPE), which doesn’t allow inline values.

How to reproduce

  • Create world with attached datapack, which includes an advancement with inline recipe definition

  • Observe it doesn’t cause any error or warning

  • Craft a Name Tag, and make sure no advancement are granted

Linked issues

Attachments

Comments 2

Thank you for your report!
We're tracking this issue in MC-310320, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
πŸ““ Bug Tracker Guidelines – πŸ’¬ Community Support – πŸ“§ Mojang Support (Technical Issues) – πŸ“§ Microsoft Support (Account Issues)
πŸ““ Project Summary – ✍️ Feedback and Suggestions – πŸ“– Game Wiki

Mueller857

(Unassigned)

Unconfirmed

26.3 Snapshot 10

Retrieved