Mojira Archive
MCPE-153910

"minecraft:food" item component's property "saturation_modifier" is not working as intended

`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:

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

  1. Download the attached addon file and import it to a new world
  2. Get the content log error and item will not parse the `saturation_modifier` properly
  3. 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

// 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

Incomplete

r4isen1920

2022-04-13, 10:40 AM

2023-01-20, 05:52 PM

2023-01-20, 05:52 PM

1

1

Unconfirmed

1.18.12 Hotfix

-