minetest.bulk_set_node

From Minetest Developer Wiki
Jump to: navigation, search


Contents

Syntax

minetest.bulk_set_node({pos1, pos2, pos3, ...}, node)


Description

  • Set node on all positions set in the first argument.
  • Faster than set_node due to single call, but still considerably slower than Lua Voxel Manipulators (LVM) for large numbers of nodes.
  • Unlike LVMs, this will call node callbacks. It also allows setting nodes in spread out positions which would cause LVMs to waste memory. For setting a cube, this is 1.3x faster than set_node whereas LVM is 20 times faster.

Parameters

For node specification or position syntax see minetest.set_node call. Note that node is a table, not a string (see node).

Example

minetest.bulk_set_node({{x=0, y=1, z=1}, {x=1, y=2, z=2}}, {name="default:stone"})
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox