When making a custom food item using behaviour packs utilising the format_version 1.20.50, the "effects" component of "minecraft:food" does not work, unlike in format_version 1.10. Hence, any addon creator wanting to utilise features in format_version 1.20.50 such as "movement_modifier" will be unable to define effects to the player upon consumption in the json file.
test.json is a file written in format_version 1.20.50 for a custom food item supposed to give hunger to the player upon consumption. Attached is a behaviour pack with two custom items, test:test and test:test2, which are both supposed to give hunger to player upon consumption, but only test:test2 does so due to being written in format_version 1.10.
In order to test, load the behavior pack in a world and thereafter give test:test to self, run around until player is hungry, and then eat test:test. It should be observed that test:test does not give any effects upon consumption. Do the same for test:test2, and it should be observed that it does give effects upon consumption, which is the intended effect of test:test.
Linked issues
is duplicated by 1
Attachments
Comments 5

Can confirm.
Steps to reproduce:
Load the attached .mcpack into a world.
Give yourself both the
test:test
andtest:test2
food items using the/give
command.Eat them.
Observed results:test:test
will not grant any status effects, meanwhile test:test2
will.
Expected results:
Both food items will apply their status effects.
Can confirm I am having this issue as well. Changing the format to an old verison allows effects to work but then I lose the texture.
Can confirm I am having this issue as well. Changing the format to an old verison allows effects to work but then I lose the texture.
Thank you for your report!
After consideration, the issue is being closed as Won't Fix.
Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki