Edible Item
A power that makes any item that matches an item condition edible.
Type ID: apugli:edible_item
Note
The actual food saturation level is determined by the food * saturation * 2
formula.
Note
This power type will only work on players.
Fields
Field | Type | Default | Description |
---|---|---|---|
item_condition |
Item Condition | The item condition that items must satisfy to be affected by this power. | |
food_component |
Food Component | The food component that the item grants upon eating it. | |
use_action |
String | optional | The action to associate with the player. One of eat or drink . Defaults to eat when null. |
return_stack |
Item Stack | optional | The item stack to replace the item with upon consumption. |
sound |
Identifier | optional | ID of the sound to play while eating an item affected by this power. If not set this will be the default eating/drinking sound. |
entity_action |
Entity Action Type | optional | If set, these action(s) will be executed on the entity eating this item. |
item_action |
Item Action Type | optional | If set, these action(s) will be executed on the item that the entity ate. |
Example
{
"type": "apugli:edible_item",
"item_condition": {
"type": "apoli: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
}
}
4 * 1 * 2
), it also counts as meat. This returns a water bucket upon consumption and uses the eat action.