minetest.create_schematic

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

minetest.create_schematic(p1, p2, probability_list, filename, slice_prob_list)

Description

  • Create a schematic from the volume of map specified by the box formed by p1 and p2.
  • Apply the specified probability values to the specified nodes in probability_list.
  • probability_list is an array of tables containing two fields, pos and prob.
  • pos is the 3d vector specifying the absolute coordinates of the node being modified,
  • and prob is the integer value from 0 to 255 of the probability (see: Schematic specifier).
  • If there are two or more entries with the same pos value, the last occuring in the array is used.
  • If pos is not inside the box formed by p1 and p2, it is ignored.
  • If probability_list is nil, no probabilities are applied.
  • Slice probability works in the same manner, except takes a field called ypos instead which indicates
  • The y position of the slice with a probability applied.
  • If slice probability list is nil, no slice probabilities are applied.



This article is missing examples, feel free to add them.


Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox