minecraft:scheduler

Dynamic value

Properties

This component has no properties in the official schema: add it as an empty object {} to switch the behaviour on.

Example from the game files

This is how vanilla Villager uses it in Minecraft Bedrock 1.26.60.5:

{
  "minecraft:scheduler": {
    "max_delay_secs": 10,
    "scheduled_events": [
      {
        "event": "minecraft:schedule_play_villager",
        "filters": {
          "all_of": [
            {
              "operator": ">=",
              "test": "hourly_clock_time",
              "value": 0
            },
            {
              "operator": "<",
              "test": "hourly_clock_time",
              "value": 11000
            }
          ]
        }
      },
      {
        "event": "minecraft:schedule_home_villager",
        "filters": {
          "all_of": [
            {
              "operator": ">=",
              "test": "hourly_clock_time",
              "value": 11000
            },
            {
              "operator": "<",
              "test": "hourly_clock_time",
              "value": 12000
            }
          ]
        }
      },
      {
        "event": "minecraft:schedule_bed_villager",
        "filters": {
          "all_of": [
            {
              "operator": ">=",
              "test": "hourly_clock_time",
              "value": 12000
            },
            {
              "operator": "<",
              "test": "hourly_clock_time",
              "value": 24000
            }
          ]
        }
      }
    ],
    "min_delay_secs": 0
  }
}

Used by 2

Vanilla entities with minecraft:scheduler in their definition:

Related components