Modify Food
Modifies the food level and saturation gain when a player eats specific food items and optionally allows executing an Entity Action on the eater.
Type ID: origins:modify_food
Fields
Field | Type | Default | Description |
---|---|---|---|
item_condition |
Item Condition | optional | If set, the modifiers will only apply to food items which satisfy this condition. |
food_modifier |
Attribute Modifiers | optional | If set, this modifier will apply to the food amount gained by eating. |
food_modifiers |
Array of Attribute Modifiers | optional | If set, these modifiers will apply to the food amount gained by eating. |
saturation_modifier |
Attribute Modifiers | optional | If set, this modifier will apply to the saturation gained by eating. |
saturation_modifiers |
Array of Attribute Modifiers | optional | If set, these modifiers will apply to the saturation gained by eating. |
entity_action |
Entity Action | optional | If set, this action will be executed on the entity eating this item. |
Example
{
"type": "origins:modify_food",
"item_condition": {
"type": "origins:ingredient",
"ingredient": {
"item": "minecraft:dried_kelp"
}
},
"food_modifier": {
"name": "Increased food points",
"operation": "addition",
"value": 3.0
},
"saturation_modifier": {
"name": "Increased saturation points",
"operation": "addition",
"value": 1
}
}
This power will add 1 and a half shanks of hunger, and 1 saturation point if a player eats a dried kelp.