Edible Item
Makes an item edible.
Type ID: origins:edible_item
Fields
| Field | Type | Default | Description |
|---|---|---|---|
entity_action |
Entity Action Type | optional | If specified, this action will be executed on the player upon consuming an item. |
item_action |
Item Action Type | optional | If specified, this action will be executed on the item consumed by the player. |
result_item_action |
Item Action Type | optional | If specified, this action will be executed on the item that is given to the player as a result of consuming an item. |
item_condition |
Item Condition Type | optional | If specified, will only make the item edible and the specified actions will only be executed if this condition is fulfilled by the item. |
food_component |
Food Component | The food component that the item grants upon eating it. | |
return_stack |
Item Stack | optional | If specified, this item stack will be given to the player. |
consume_action |
String | "eat" |
Determines whether the action of consuming the item is considered "eating" ("eat") or "drinking" ("drink"). |
consume_sound |
Identifier | If specified, the sound event with this namespace and ID will be played when the item is eaten. | |
priority |
Integer | 0 |
Determines the priority of which the power will apply its modification to the item. Must be higher than 0 if the item is already edible. |
Examples
{
"type": "origins:edible_item",
"item_condition": {
"type": "origins:ingredient",
"ingredient": {
"item": "minecraft:axolotl_bucket"
}
},
"food_component": {
"hunger": 4,
"saturation": 1,
"meat": true
},
"use_action": "eat",
"return_stack": {
"item": "minecraft:water_bucket",
"amount": 1
}
}
This example will grant the players the ability to eat axolotls in buckets. It will give 4 hunger shanks and 8 saturation (4 * 1 * 2), it also counts as meat. This returns a water bucket upon consumption and uses the eat action.