# Time

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.&#x20;

Here is some information about day/night cycle in vanilla dimensions.&#x20;

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.&#x20;

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.&#x20;

{% hint style="info" %}
[See how to construct a range here.](https://frinn.gitbook.io/custom-machinery-1.19/misc/range)
{% endhint %}

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

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

<details>

<summary>Range</summary>

#### Name : range

#### Description :&#x20;

A time range.

#### Example :&#x20;

```json
"range": "[12000, 18000)"
```

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

</details>

### 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).

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