minetest.add_node_level

From Minetest Developer Wiki
Jump to: navigation, search


Contents

Syntax

minetest.add_node_level(pos, level)


Description

Increases the level of leveled node (water, snow etc.) by level. If totallevel > maxlevel it returns the rest (total - max). Can be negative to decrease.

Parameters

1: List of 3 vertices (x, y, z)

2: Node level int 0 - 63 (default = 1)

Example

blockpos = {x=0, y=50, z=0}
minetest.place_node(blockpos, "default:water")
minetest.add_node_level(blockpos, 2)
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox