minetest.set_node

From Minetest Developer Wiki
(Redirected from minetest.add node)
Jump to: navigation, search

Same as minetest.add_node

Syntax

minetest.set_node(pos, node)

Description

Sets node at pos to node. Note that node is a table, not a string (see node). It may work faster in a minetest.register_on_generated.

NOTE: This method will not keep the node metadata of the previous node. Use minetest.swap_node for that.

Example

minetest.set_node({x=0, y=0, z=0}, {name="default:dirt"})
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox