# Custom Sky#

Note

All property names are case-sensitive.

Custom Sky changes the skybox texture, and can apply different sets of skies depending on the time, biome, heights, weather, etc.

Location

/assets/minecraft/optifine/sky.properties

Properties that specify a path to a texture file can use any of the following syntax:

 Relative to assets/minecraft/ path/filename ➔ assets/minecraft/path/filename Relative to assets/minecraft/optifine/ ~/path/filename ➔ assets/minecraft/optifine/filename Relative to location of properties file ./path/filename ➔ (path of properties file)/path/filename Absolute path with namespace namespace:path/filename ➔ assets/namespace/path/filename

Place the file at

• ~/sky/world0/sky0.properties

• ~/sky/world0/sky1.properties

• … etc.

in the resource pack. Each file represents one layer of the sky. OptiFine will continue loading them until a .properties file is not found. The order of the numbers is the order in which they will be rendered in game.

Additionally, two special properties files are applied to the sun and moon if present. This is mainly intended to allow overriding the blend method used by the sun and moon:

• ~/sky/world0/sun.properties: replaces sun.png

• ~/sky/world0/moon_phases.properties: replaces moon_phases.png

 The Vanilla sun.png# The Vanilla moon_phases.png#

Instead of a full skybox, the source texture should match the layout of sun.png or moon_phases.png.

Important

The “world0” in the path refers to the overworld. If there were other worlds with skies (the Nether and End do not use the standard sky rendering# methods), their files would be in ~/sky/world<world number>.

## Properties#

Note

speed does not affect the fading in and out, which always occurs on a 24-hour cycle

Key

Values

Meaning

startFadeIn

Values: String, hh:mm 24-hour format
Required: ❌ No
Fade in/out times. All times are in hh:mm 24-hour format. See Time format.
If no times are specified the layer is always rendered.

endFadeIn

Values: See above
Required: ❌ No

endFadeOut

Values: See above
Required: ❌ No

source

Values: String, path to texture
Required: ❌ No
Default: sky<n>.png in same directory
Name of source texture.
This can be anywhere in the resource pack and multiple properties files can share the same source.

blend

Values: add, subtract, multiply, dodge, burn, screen, replace, overlay, or alpha
Required: ❌ No
Default: add
Here, ‘previous layer’ can refer to the default sky or to the previous custom sky defined by sky<n-1>.properties.
Supported blending methods are:
add: Add this sky bitmap to the previous layer. In case of overflow, white is displayed.
subtract: Subtracts this sky bitmap to the previous layer. In case of negative values, black is displayed.
multiply: Multiply the previous RGBA values by the RGBA values in the current bitmap.
dodge: Lightens the sky bitmap
burn: Darkens the sky bitmap
screen: Inverts both layers, multiplies them, and then inverts that result.
replace: Replace the previous layer entirely with the current bitmap. There is no gradual fading with this method; if brightness computed from the fade times is > 0, the full pixel value is used.
overlay: RGB value > 0.5 brightens the image, < 0.5 darkens.
alpha: Weighted average by alpha value.

rotate

Values: Boolean
Required: ❌ No
Default: true
Rotation.
Whether or not the bitmap should rotate with the time of day.

speed

Values: Positive float
Required: ❌ No
Default: 1.0
Rotation speed as a multiple of the default of one 360-degree cycle per game day.
A value of 0.5 rotates every two days.
Irrational values can be useful to make clouds appear in different positions each day.

axis

Values: List of three floats
Required: ❌ No
Default: 0.0 0.0 1.0
Axis of rotation.
If a player is looking in the given direction, the skybox will appear to be rotating clockwise around the line of sight.
Default rotation is along the southern axis (rising in the east and setting in the west).
For reference, the vectors corresponding to the six cardinal directions are below.
However, the rotation axis can be any vector except 0.0 0.0 0.0.
down = 0 -1 0
up = 0 1 0
north = 0 0 -1
south = 0 0 1
west = -1 0 0
east = 1 0 0

days

Values: List of integers or integer ranges
Required: ❌ No
Days for which the layer is to be rendered.
Days are numbered from 0 to daysLoop-1, for example: days=0 2-4 6

daysLoop

Values: Positive integer
Required: ❌ No
Default: 8

Number of days in a loop, see above

weather

Values: clear, rain, or thunder
Required: ❌ No
Default: clear
Weather.
Weather for which the layer is to be rendered.
Several values can be specified separated by space, for example weather=clear rain thunder

biomes

Values: List of biome IDs
Required: ❌ No

Limit the sky layer to only certain biomes.

heights

Values: List of integers or integer range
Required: ❌ No
Limit the sky layer to only certain heights.
Since 1.18, negative values may be specified for height. When used in a range they have to be put in parenthesis ( ).

transition

Values: Integer
Required: ❌ No
Default: 1
Transition time (in seconds) for the layer brightness.
It is used to smooth sharp transitions, for example between different biomes.

## Time format#

All times are in hh:mm 24-hour format.

For reference,

 Sunrise 6:00 /time set 0 Noon 12:00 /time set 6000 Sunset 18:00 /time set 12000 Midnight 0:00 /time set 18000
The fade times control the brightness when blending.

startFadeOut does not need to be specified; its value is uniquely determined by the other three.