`minecraft:food` component used for items with the newer format version 1.16.100+ has a property called `saturation_modifier` in which is not working as intended.
On the official documentation, the property is documented as follows:
[media]saturation_modifier
Saturation Modifier is used in this formula (nutrition * saturation_modifier * 2). Default value is set to 0.6.
Minimum value: 0.00
Type: float
However, upon testing it does not seem to work as intended and seems to only accept predefined strings:
"poor";
"low";
"normal";
"high";
"good";
"max"; and
"supernatural"
This format was originally used in the older format version 1.10. In addition, I already have necessary "Experiments" toggled enabled so that the game would (hopefully) parse 1.16.100+ format version items in properly.
Repro steps
Download the attached addon file and import it to a new world
Get the content log error and item will not parse the `saturation_modifier` properly
You may edit the file (BP/items/cook/tasty_food_1.json) and change the value to either any float value and it will not work as documented.
Content log errors
[media]// if the "saturation_value" specified was a float (e.g. 0.6):
[Json][error]-upgrade items/cook/tasty_food_1.json | minecraft:item | components | minecraft:food | saturation modifier field in food item component was not a string
// if the "saturation_value" specified as a string (e.g. "0.6"):
[Json][error]-upgrade items/cook/tasty_food_1.json | minecraft:item | components | minecraft:food | unknown saturation_modifier type '0.6' in food component, defaulted to 0.6
Attachments
Comments 4
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 yes, can you please add it to the affected versions (or mention it if you are not the reporter)?
This ticket will automatically reopen when you reply.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📓 Project Summary – 📧 Suggestions – 📖 Minecraft Wiki
Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.
For any account or purchasing related issues, please contact Minecraft Customer Support directly, as we cannot assist with those here at the bug tracker.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki
Resolving temporarily as Awaiting Response. Could you please attach your add-on to this ticket?