Time

Make the recipe work only at a specific time of the Minecraft day/night cycle

Time requirement is used to make the recipe work only in some times of the Minecraft day/night cycle.

The daytime that this requirement use is dependent to the dimension the machine is in.

Here is some information about day/night cycle in vanilla dimensions.

For modded dimensions please ask to the mod author how they defined the day/night cycle in their custom dimensions.

Minecraft day/night cycle in Overworld is based in 24000 ticks, from 0 to 23999.

  • 0 is sunrise

  • 6000 is noon

  • 12000 is sunset

  • 18000 is midnight

The Nether and The End don't have day/night cycle and their day time is frozen to 12001 ticks.

This requirement is an input only requirement, meaning that you don't have to define the mode property.

It is used only to block or allow the usage of a recipe during certain times of the day/night cycle but don't have any real inputs or outputs.

To use this requirement you must provide a list of time range.

Example of time ranges :

"(12000,)" means the recipe will only run if the dimension daytime is higher than 12000 ticks, so between 12001 and 23999 included (only night).

"(,6000]" means the recipe will only run if the dimension daytime is lower or equals than 6000 ticks, so between 0 and 6000 included.

The requirement type of time requirement is : "custommachinery:time".

Properties

The time requirement has 2 mandatory properties.

Mandatory properties

"type": "custommachinery:time" //Mandatory to define a time requirement.
Range

Name : range

Description :

A time range.

Example :

"range": "[12000, 18000)"

The recipe will only start if the dimension daytime the machine is in is between 12000 and 17999 ticks included.

Example

A time requirement that will make the recipe start only if the dimension daytime the machine is in is inferior to 12000 (daytime in overworld).

{
    "type": "custommachinery:time",
    "range": "(,12000)"
}

Last updated