How Bedrock Handles Edible Items
Making an item edible is not done with a single switch. Instead, Bedrock splits the eating mechanic across three distinct components that must all be present for the item to work. If any one of them is missing, the player will stand still holding the item with no way to actually consume it.
First, minecraft:food defines what happens when the item is swallowed, such as how many hunger points it restores and whether it leaves an empty bowl behind. Second, minecraft:use_modifiers controls how long the player has to hold the use button to finish eating and how much they slow down while doing so. Third, minecraft:use_animation tells the game to play the eating or drinking animation and sound effects while the button is held.
Complete Food Item Example
This example creates a custom Berry Stew. It stacks up to 16, takes the standard 1.6 seconds to eat, restores 6 hunger points (three full shanks on the HUD), and returns a vanilla bowl to the player's inventory once finished.
Place this file in your behavior pack's items folder. Because it uses the modern item format, the texture icon and creative menu placement are handled directly inside the behavior file alongside the food mechanics.
{
"format_version": "1.20.50",
"minecraft:item": {
"description": {
"identifier": "custom:berry_stew",
"menu_category": {
"category": "equipment",
"group": "itemGroup.name.miscFood"
}
},
"components": {
"minecraft:icon": {
"texture": "berry_stew"
},
"minecraft:max_stack_size": 16,
"minecraft:use_animation": "eat",
"minecraft:use_modifiers": {
"use_duration": 1.6,
"movement_modifier": 0.35
},
"minecraft:food": {
"nutrition": 6,
"saturation_modifier": 0.6,
"can_always_eat": false,
"using_converts_to": "minecraft:bowl"
}
}
}
}The minecraft:food Component
The minecraft:food component holds the nutritional properties of your item. Nutrition is straightforward: 1 point equals half a hunger shank on the player's screen, with the full bar totaling 20 points.
Saturation is slightly less obvious because Bedrock calculates it using a multiplier rather than a flat value. The total saturation restored is equal to nutrition * saturation_modifier * 2. In the Berry Stew example above, a nutrition of 6 and a modifier of 0.6 gives 6 * 0.6 * 2 = 7.2 saturation points. Keep this formula in mind so you do not accidentally create mid-tier foods that outclass golden carrots.
| Field | What it does | Notes |
|---|---|---|
| nutrition | Restores hunger points on the HUD. | Integer. 1 point = half a hunger icon. |
| saturation_modifier | Controls hidden saturation restored. | Float. Total saturation = nutrition * modifier * 2. Standard cooked meats use 0.8. |
| can_always_eat | Allows eating even when the hunger bar is full. | Boolean. Defaults to false. Set to true for Golden Apple style items or drinks. |
| using_converts_to | Replaces the eaten item with another item. | String identifier. Use "minecraft:bowl" for stews or "minecraft:glass_bottle" for drinks. |
Controlling Eating Speed and Animations
Without minecraft:use_modifiers and minecraft:use_animation, the game knows the item is food, but gives the player zero time or action to eat it. Standard vanilla foods use a use_duration of 1.6 seconds, while quick snacks like dried kelp use 0.8 seconds. The movement_modifier field accepts a value between 0.0 and 1.0, where 0.35 matches the normal vanilla slowdown while chewing.
For minecraft:use_animation, you will almost always set the value to "eat" or "drink". Setting it to "drink" swaps the crunching particles and burp sounds for sipping noises, which is ideal if you are making custom juices, teas, or potions that return a glass bottle.
Adding Status Effects When Eaten
In older Bedrock versions, food items could apply potion effects directly inside the JSON using an effects array inside minecraft:food. In format versions 1.20.30 and above, that array was removed from the stable item schema along with the old item event system.
To make a food item grant Regeneration, Speed, or Poison in modern packs, you have two choices. The recommended route is the Script API: listen to the world.afterEvents.itemCompleteUse event in JavaScript, check if event.itemStack.typeId matches your custom food, and call event.source.addEffect() on the player. Alternatively, if you cannot use scripts, you must drop the item's format_version down to 1.10.0, which uses the legacy item schema where the effects array inside minecraft:food is still parsed by the engine.
import { world } from "@minecraft/server";
world.afterEvents.itemCompleteUse.subscribe((event) => {
if (event.itemStack.typeId === "custom:berry_stew") {
event.source.addEffect("regeneration", 100, { amplifier: 1 });
}
});Textures and Display Names
For the item to look right in-game, you need to link the short texture name used in minecraft:icon ("berry_stew") to an actual PNG file in your resource pack. Add an entry inside RP/textures/item_texture.json under the texture_data object pointing to textures/items/berry_stew.
Finally, define the item's human-readable name in RP/texts/en_US.lang. For an item with the identifier custom:berry_stew, the localization key is item.custom:berry_stew=Berry Stew.
{
"resource_pack_name": "custom_rp",
"texture_name": "atlas.items",
"texture_data": {
"berry_stew": {
"textures": "textures/items/berry_stew"
}
}
}Which versions this applies to
Applies to Bedrock Edition 1.20.50 and newer. No experimental toggles are required for any of the JSON components or the itemCompleteUse script event shown on this page.
When it does not work
| What you see | Why | The fix |
|---|---|---|
| Holding right-click or long-pressing the screen does nothing at all. | You either forgot to include minecraft:use_modifiers with a use_duration greater than zero, or the player's hunger bar is currently full (or the world is in Creative mode) and can_always_eat is set to false. | Add the minecraft:use_modifiers component with "use_duration": 1.6, and test in Survival mode with depleted hunger or set "can_always_eat": true. |
| The player slows down when holding right-click, but the item does not bob up and down, makes no sound, and cannot be finished. | The item is missing the minecraft:use_animation component. | Add "minecraft:use_animation": "eat" (or "drink") to your item's components list. |
| Content Log shows: [Item][error] custom:berry_stew | minecraft:food | child 'effects' is not valid here. | You tried to put an effects array inside minecraft:food while using a modern format_version like 1.20.50. | Remove the effects array from the JSON and apply the potion effect using world.afterEvents.itemCompleteUse in a behavior pack script. |
Reference, straight from the game files
Read out of the game itself, so the ids match the version you are building for.
