Action On Item Use

Power Type

Executes an Entity Action Type or an Item Action Type when the player finishes using an item (e.g: eating food or drinking a potion).

Type ID: origins:action_on_item_use

Fields

Field Type Default Description
entity_action Entity Action Type optional If specified, this action will be executed on the player after they use an item.
item_action Item Action Type optional If specified, this action will be executed on the remaining item.
item_condition Item Condition Type optional If specified, the actions will only execute if this condition is fulfilled by the item before use.

Examples

{
    "type": "origins:action_on_item_use",
    "entity_action": {
        "type": "origins:feed",
        "food": 1.0,
        "saturation": 1.0
    },
    "item_condition": {
        "type": "origins:ingredient",
        "ingredient": {
            "item": "minecraft:potion"
        }
    }
}

This example will give half a shank of hunger, and 1 saturation point if the player drinks any kind of potion.