diurnal Namespace

Functions related to the time of day and the moon.

Note

These functions are not available for biome condition scripts.

Boolean diurnal.isDay()

Indicates whether it is currently daytime in the player dimension.

Returns:

Returns true if it is day, false otherwise.

Return type:

Boolean

Boolean diurnal.isNight()

Indicates whether it is currently nighttime in the player dimension.

Returns:

Returns true if it is nighttime, false otherwise.

Return type:

Boolean

Boolean diurnal.isSunrise()

Indicates whether it is currently sunrise in the player dimension.

Returns:

Returns true if it is sunrise, false otherwise.

Return type:

Boolean

Boolean diurnal.isSunset()

Indicates whether it is currently sunset in the player dimension.

Returns:

Returns true if it is sunset, false otherwise.

Return type:

Boolean

Float diurnal.getMoonPhaseFactor()

Gets the current phase of the moon as a float.

Returns:

0.0 - 1.0, with 0.0 being the new moon, and 1.0 as a full moon.

Return type:

Float

Float diurnal.getCelestialAngle()

Gets the current celestial angle of the sun, in radians (if I recall correctly).

Returns:

Celestial angle of the sun

Return type:

Float