Origins: Powerful Powers
» Entity conditions » Time since last meal

Time since last meal

origins-powerful-powers:time_since_last_mealentity conditionplayers onlytracked

Ticks since the player's food level last went up.

FieldTypeDefaultDescription
comparisonComparisonrequired
compare_toIntegerrequiredticks
  • Any rise in the food level counts as a meal, whatever caused it: eating any food, Peaceful difficulty refilling the bar, the Saturation effect, or a power or command that adds hunger.
  • Eating on a full bar doesn't count. The food level is already 20 and can't rise, so a golden apple or chorus fruit eaten at full hunger leaves the timer running.
  • A player who hasn't eaten since the server started has a very large value, so ">" checks are true.

Example:

json
{
  "type": "origins:action_over_time",
  "interval": 100,
  "condition": {
    "type": "origins-powerful-powers:time_since_last_meal",
    "comparison": ">",
    "compare_to": 12000
  },
  "entity_action": {
    "type": "origins:apply_effect",
    "effect": {
      "effect": "minecraft:weakness",
      "duration": 120,
      "amplifier": 0
    }
  }
}

If you haven't eaten in 10 minutes, you're weakened.

Attribute: time_since_last_meal