πŸ•’Cronslab

An advanced redstone scheduler block with a similar syntax to cronarrow-up-right. See Usage for a heavily detailed overview, or Examples for a quick start.

Crafting

Crafting recipe for two Cronslabs: a clock in the center with two copper ingots either side.

Usage

Right click to open the GUI and input the expression. The GUI contains a "to English" translator of the given expression, but this is also gone over below.

Fields

A cronslab is made up of four fields representing ticks, seconds, minutes, and minecraft days. Each describes which value of that field's interval the signal should be active.

circle-info

There are some extra rules for this different to cron, but have been made in a way that tries to 'make sense' for Minecraft, and doesn't need consideration. See Quirks.

Example:

The tick field has an interval of 20 (since 20 ticks = 1 second). So for the following values of the field:

Fields can be a comma-separated list of values, which pass if any value passes (an OR expression):

Expression

An expression is made of the four fields, where all must pass to emit a signal.

Quirks

There are two things that are worth noting for advanced use.

Gametime vs Daytime

Per the minecraft wikiarrow-up-right:

There are [multiple] types of time:

  • Gametime - The total number of game ticksarrow-up-right that have elapsed in the world.

  • Daylight cycle time (aka. internal daytime) - The total number of game ticks that have elapsed during the daylight cycle. It does not elapse when the game rule advance_timearrow-up-right is false.

By default, the expression evaluator will operate on gametime. This counts from the world start, and isn't affected by the advance_time gamerule, but might not be synced to the visual day/night cycle. However, if the day field is relevant (i.e. not *), then the Cronslab will work on the daytime. This is synchronised with the visual day/night cycle, but will not update when advance_time is false.

Interval Extension

In normal cron you can't schedule, for example, every 45 minutes in a single expression. Cronslab gets around this by possibly extending the interval of a field when checked. The rules are meant be common sense, but for clarify:

  • If the field is cyclical (a wildcard or unbounded range e.g. 4/2), then it's interval is multiplied by each field 'ahead' that has at least one wildcard value.

  • Example: The ticks field in */15 * 0 * will have it's interval extended to 20 * 60 = 1200, which correctly spaces signals every 15 ticks.

  • The days field has an effective infinite interval.

Last updated