minetest.get_node_light

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

minetest.get_node_light(pos, timeofday)

Description

Returns the node light level (0...15) at the given position at timeofday. If timeofday is nil then the current time is used.

This function returns the light value "inside" of the node at given position. So if you need to get the light value ontop of target node you need to get the light value of position above the target.

Example

print(minetest.get_node_light({x=0, y=0, z=0})
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox