1. Wiki
  2. /Entities
  3. /minecraft:behavior.timer_flag_3

minecraft:behavior.timer_flag_3

Don't want to write this by hand? GodCraft sets minecraft:behavior.timer_flag_3 for you with a switch.Get GodCraft

Overview

minecraft:behavior.timer_flag_3 is an entity component: it goes in the components object of a custom mob, or in one of its component groups. A general-purpose timer goal: it fires an event when it starts, runs for a while, then fires another event when it ends or gets interrupted. While it runs, query.timer_flag_3 returns 1, so you can use it to drive animations. Three of these (timer_flag_1 to 3) let you run separate timers.

Fields

FieldTypeDefaultDescription
duration_rangeFloatRange{"max":0,"min":0}Random length, in seconds, that the goal runs.
cooldown_rangeFloatRange{"max":0,"min":0}Random wait, in seconds, before the goal can run again. If set, it also applies before the very first run.
on_startActorDefinitionTrigger{"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"}Event that runs when the goal starts.
on_endActorDefinitionTrigger{"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"}Event that runs when the goal ends or is interrupted.
priorityinteger0Decides which goal wins when several want to run: lower numbers run first.Range: 0 to …
control_flagsGoal's control flags[]noneLists the body parts this goal takes control of (such as move, look or jump), so goals that need the same part don't run together.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:behavior.timer_flag_3": {
    "duration_range": {
      "max": 0,
      "min": 0
    },
    "cooldown_range": {
      "max": 0,
      "min": 0
    },
    "on_start": {
      "event": "",
      "filters": {
        "AND": null,
        "NOT": null,
        "OR": null,
        "all": null,
        "all_of": null,
        "any": null,
        "any_of": null,
        "none_of": null
      },
      "target": "self"
    },
    "on_end": {
      "event": "",
      "filters": {
        "AND": null,
        "NOT": null,
        "OR": null,
        "all": null,
        "all_of": null,
        "any": null,
        "any_of": null,
        "none_of": null
      },
      "target": "self"
    },
    "priority": 0,
    "control_flags": []
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more