Custom Food
Type ID: item:food
Fields:
| Field | Type | Default | Description |
|---|---|---|---|
name |
String | optional | The display name of the item. Can be a literal string or a translation key. If none is given, it'll default to item.namespace.path. |
lore |
Array of Strings | optional | Lines of text below an item. |
item_powers |
Array of Item Powers | optional | The powers your item will have. |
max_count |
Integer | 64 |
The maximum stack count for the item. |
item_group |
Item Group | misc |
The tab you can find the item in. |
fuel_tick |
Integer | 0 |
How long the item can smelt for in a furnace. |
hunger |
Integer | 4 |
how many hunger it fills up (1 = half a bar). |
saturation |
Float | 8.0 |
How many saturation points the food fills. |
meat |
Boolean | false |
If set to true, you'll be able to use this item to feed dogs, and it will be identified as meat by the Meat (Item Condition Type). |
always_edible |
Boolean | false |
If set to true, this item will always be edible, even with full hunger. |
drinkable |
Boolean | false |
If true, makes you drink it as if it was milk or a potion. |
sound |
Identifier | "entity.generic.eat" |
The sound that plays while you are eating the item. |
returns |
Identifier | optional | The item that this item returns when used. |
eating_time |
Integer | 30 |
The amount of time (in ticks) the item will take to eat. |
Example Code:
{
"type": "item:food",
"max_count": 64,
"hunger": 8,
"saturation": 12,
"meat": false,
"always_edible": true,
"returns": "minecraft:diamond",
"drinkable": false,
"sound": "minecraft:block.sand.place",
"eating_time": 60
}