Skip to content

Brightness

Provides the brightness level at a specific position.

Type ID: kaya:brightness

Info

The brightness value is calculated using the following formula: $(Brightness = AmbientLight + (1 - AmbientLight) * LightLevel \div (60 - 3 * LightLevel))$

Brightness values for the vanilla dimensions

Here's a table of light levels with their corresponding brightness values in each vanilla dimension:

Light level Brightness
$0$ $0.0$
$1$ $0.017543859649122806$
$2$ $0.037037037037037035$
$3$ $0.058823529411764705$
$4$ $0.08333333333333333$
$5$ $0.1111111111111111$
$6$ $0.14285714285714285$
$7$ $0.1794871794871795$
$8$ $0.2222222222222222$
$9$ $0.2727272727272727$
$10$ $0.3333333333333333$
$11$ $0.4074074074074074$
$12$ $0.5$
$13$ $0.6190476190476191$
$14$ $0.7777777777777778$
$15$ $1.0$
Light level Brightness
$0$ $0.1$
$1$ $0.11578947368421053$
$2$ $0.13333333333333333$
$3$ $0.15294117647058825$
$4$ $0.175$
$5$ $0.2$
$6$ $0.2285714285714286$
$7$ $0.26153846153846155$
$8$ $0.30000000000000004$
$9$ $0.34545454545454546$
$10$ $0.4$
$11$ $0.4666666666666667$
$12$ $0.55$
$13$ $0.6571428571428571$
$14$ $0.7999999999999999$
$15$ $1.0$
Light level Brightness
$0$ $0.0$
$1$ $0.017543859649122806$
$2$ $0.037037037037037035$
$3$ $0.058823529411764705$
$4$ $0.08333333333333333$
$5$ $0.1111111111111111$
$6$ $0.14285714285714285$
$7$ $0.1794871794871795$
$8$ $0.2222222222222222$
$9$ $0.2727272727272727$
$10$ $0.3333333333333333$
$11$ $0.4074074074074074$
$12$ $0.5$
$13$ $0.6190476190476191$
$14$ $0.7777777777777778$
$15$ $1.0$

Format

Field Type Default Description
position Vec3 Provider The position to get the brightness from.

Example

{
    "type": "kaya:brightness",
    "position": {
        "type": "kaya:entity/position",
        "entity": "this",
        "anchor": "eyes"
    }
}